In [29]: import pandas as pd
In [30]: pd.to_datetime(pd.Series(["02-04-1995","02/04/1996", "12/31/1996"]))
Out[30]:
0 1995-02-04
1 1996-02-04
2 1996-12-31
dtype: datetime64[ns]
I have given 2 different datetime formats. Pandas can autodetect the format. In the value 12/31/1996 I have given in the format mm/dd/yyyy. It can still detect the correct format without explicitly giving it.
So, Which all formats or values can pandas to_datetime() can auto-detect?