在dask中将日期插入日期时间索引的列
问题描述:
pd.DatetimeIndex(df_dask_dataframe['name_col'])
I have a dask dataframe for which I want to convert a column with dates into datetime index. However I get a not implemented error. Is there a workaround?
答
我认为您需要 dask.dataframe.DataFrame.set_index
如果列的 dtype
是 datetime64
:
df_dask_dataframe = df_dask_dataframe.set_index('name_col')