如何基于数据列对不规则数据集进行升采样?

时间:2019-07-18 12:12:14

标签: python pandas resampling

我有一个熊猫数据框,其中包含基于深度的记录数据。深度间隔不规则。 我需要按常规dx步骤将数据集隔开。

有没有一种方法可以将其填充到单独的numpy数组中并分别进行插值?

所有列的单独插值。

extension DashboardView: UITableViewDataSource, UITableViewDelegate {

    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return recents.count + contents.count
    }

    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {

        if indexPath.row == 0 {
            let recent = recents[indexPath.row]

            let cell = tableView.dequeueReusableCell(withIdentifier: "ContentCell") as! ContentCell
            cell.setContent(content: content)
            cell.delegate = self as? ContentCellDelegate
            return cell
        }
        else {
            let content = contents[indexPath.row - 1]

            let cell = tableView.dequeueReusableCell(withIdentifier: "RecentCell") as! RecentCell
            cell.setRecent(recent: recent)
            cell.delegate = self
            return cell
        }        
    }

}

进行插值/重采样的熊猫或其他库函数

1 个答案:

答案 0 :(得分:0)

我最终从interp1d包中得到了signal