在dask中将日期插入日期时间索引的列 [英] column with dates into datetime index in dask
本文介绍了在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')
这篇关于在dask中将日期插入日期时间索引的列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文