So I'm new to python and pandas. I'm using to_datetime
function to convert 1605121950805 into a real date format. If I use:
dates=pd.to_datetime(1605121950805, infer_datetime_format=True,yearfirst=True)
I get: 1970-01-01 00:26:45.121950805
If I use format parameter it works fine:
dates=pd.to_datetime(1605121950805, format='%y%m%d%H%M%S%f')
Output: 2016-05-12 19:50:08.050000
So if I specifying a format it works but I would like to know is there any way to make it work without format parameter, so infer_datetime_format
can guess the right format?