Sort date column on pandas

Asked

Viewed 3 times

0

Good afternoon Guys, I need your help.

Why when I use the df1['Delivery'] = pd.to_datetime(df1['Delivery']) command and export to excel via the df1.to_excel('Production 1.xlsx', index=False) my DELIVERY column does not follow a logic, as you can see, until line 4 follows an order of year/month/day and after line 4 this order changes from year/month/day to year/day/month.

Entrega Mes 2021-03-22 00:00:00 March 2021-03-22 00:00:00 March 2021-03-22 00:00:00 March 2021-03-22 00:00:00 March 2021-12-03 00:00:00 March 2021-10-03 00:00:00 March 2021-06-05 00:00:00 May 2021-02-07 00:00:00 July 2021-09-08 00:00:00 August 2021-09-08 00:00:00 August 2021-07-26 00:00:00 July 2021-09-08 00:00:00 August 2021-07-21 00:00:00 July 2021-07-16 00:00:00 July 2021-07-16 00:00:00 July 2021-07-16 00:00:00 July 2021-08-16 00:00:00 August 2021-07-27 00:00:00 July 2021-07-15 00:00:00 July

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.