pd.to_datetime is getting half my dates with flipped day / months

后端 未结 2 2018
梦谈多话
梦谈多话 2020-12-02 01:02

My dataset has dates in the European format, and I\'m struggling to convert it into the correct format before I pass it through a pd.to_datetime, so for all day < 12, my

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-02 01:28

    Add format.

    df['Date'] = pd.to_datetime(df['Date'], format='%d/%m/%Y') 
    

提交回复
热议问题