How to make two different date format in single column unique?

后端 未结 3 834
隐瞒了意图╮
隐瞒了意图╮ 2020-12-22 03:36

I have one column in I don\'t understand how but there is two different format in a single column.

df[\'Date\'] = [6/24/2019,6/14/2019,2019-09-06 00:00:00,6/         


        
3条回答
  •  滥情空心
    2020-12-22 04:14

    Try importing the datetime class. This will allow you to use the strptime function like below:

    format = '%d/%m/%Y'
    data['New_date'] = datetime.strptime('2019-09-06 00:00:00', format)
    

提交回复
热议问题