in:
df.date
out:
0 1987-06-24 00:00:00
1 19910922
I have a pandas column that is a mix of integer and DateTime types. I am trying to convert the integer values into datetime.
Usually the column is only integers, and I use df.date= pd.to_datetime((df.date.astype(str)), format='%Y%m%d')
to convert the column into a datetime format.
How do I handle this when some datetime values are thrown into the column?