I wrote a code that reads multiple files, however on some of my files datetime swaps day & month whenever the day is less than 13, and any day that is from day 13 or abo
You can use the dayfirst parameter in pd.to_datetime.
dayfirst
pd.to_datetime
pd.to_datetime(df.tmp, dayfirst=True)
Output:
0 2015-06-11 00:56:55 1 2015-06-11 04:16:38 2 2015-06-12 16:13:30 3 2015-06-12 21:24:03 4 2015-06-13 02:31:44 5 2015-06-13 02:37:49 Name: tmp, dtype: datetime64[ns]