column with dates into datetime index in dask

六月ゝ 毕业季﹏ 提交于 2019-12-13 17:33:18

问题


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?


回答1:


I think you need dask.dataframe.DataFrame.set_index if dtype of column is datetime64:

df_dask_dataframe = df_dask_dataframe.set_index('name_col')


来源:https://stackoverflow.com/questions/44992508/column-with-dates-into-datetime-index-in-dask

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!