i have a dataframe with 1.000.000 there is a column called "datetimes". The problem is that the half datetimes follow this format:
2022-month-day hour-minutes-seconds
and the rest datetimes follow this format
2022-day-month hour-minutes-seconds
does anybody knows what i have to add in my code in order to have this ouput i want all the datetimes to be with this format: 2022-MONTH-DAY
a sample of my dataframe is Datetime 0 2022-09-06 12:33:40 1 2022-09-06 12:33:50 2 2022-09-06 12:34:00 . . . 10.000 2022-09-06 23:59:50 . . 55251 2022-06-15 22:02:20 55252 2022-06-15 22:02:30 55253 2022-06-15 22:02:40 55254 2022-06-15 22:02:50 . . 311492 2022-07-15 13:52:20 311493 2022-07-15 13:52:30 311494 2022-07-15 13:52:40 . .
537534 2022-10-08 17:47:00 537535 2022-10-08 17:47:10 537536 2022-10-08 17:47:20
as you can see the formation of the datetime changes many times
1条答案
按热度按时间kmpatx3s1#
因为我是个初学者,所以如果我的答案有帮助的话,我会告诉你的,但是如果你能展示你的代码,看看你是否写错了什么或者缺少了什么也会很有帮助。
我做了一个小片段:
输出:
希望有帮助。