python dt error only use with datetimelike values

Solutions on MaxInterview for python dt error only use with datetimelike values by the best coders in the world

showing results for - "python dt error only use with datetimelike values"
Maire
04 Nov 2019
1# Your problem here may be that to_datetime silently failed so the dtype remained as str/object, 
2# if you set param errors='coerce' then if the conversion fails for any particular string 
3# then those rows are set to NaT.
4
5df['Date'] = pd.to_datetime(df['Date'], errors='coerce')
similar questions