dask dataframe how to convert column to to_datetime

后端 未结 5 1407
后悔当初
后悔当初 2020-12-05 05:27

I am trying to convert one column of my dataframe to datetime. Following the discussion here https://github.com/dask/dask/issues/863 I tried the following code:



        
5条回答
  •  独厮守ぢ
    2020-12-05 06:17

    I'm not sure if it this is the right approach, but mapping the column worked for me:

    df['time'] = df['time'].map(lambda x: pd.to_datetime(x, errors='coerce'))
    

提交回复
热议问题