0

我正在尝试用我自己的分区替换 Series dask 分区。我在这篇文章中使用了@MRocklin给出的代码片段。

list_of_delayed = dask_df.to_delayed()
new_partition = dask.delayed(pd.read_csv)(filename)
list_of_delayed[i] = new_partition
new_dask_df = dd.from_delayed(list_of_delayed, meta=dask_df._meta)

除了 dask_df 在我的情况下是一个系列之外,我已经完成了完全相同的操作。我收到以下错误:

Traceback (most recent call last):
File "sdfr_dhruvkmr.py", line 465, in <module>
    pts = task[(task.task_date <= dtm.Time.iloc[i]) & (task.T_Date == dtm.Date.iloc[i])]
  File "/usr/lib/python2.7/site-packages/edask/dataframe.py", line 130, in __getitem__
    new_dask_df = dd.from_delayed(list_of_delayed)
  File "/usr/lib/python2.7/site-packages/edask/edask/dask/dataframe/io/io.py", line 493, in from_delayed
    type(df).__name__)
TypeError: Expected Delayed object, got Delayed
4

0 回答 0