I have a Python Dataframe like this
Index Name Dateofbirth
0 A. 12JAN1980:00:00:00.000000
1 B. 17JUN1954:00:00:00.000000
...
1250000 X. 09DEC1957:00:00:00.0000
The problem is that in the raw data csv file, my dates are stored in this format %d%m%Y:00:00:00.000000
So, the issue arises when I read this csv file into Python and convert Date of birth column into datetime with the following code
df['Dateofbirth'] =pd.to_datetime(df['Dateofbirth'])
I get the following error :
raise ValueError("Unknown string format:", timestr) ValueError: ('Unknown string format:', '12JAN1980:00:00:00.000000
How can I change this format into the acceptable datetime format of %Y%m%d %H%M%S ? Changing the raw csv file is out of the question as there are over 1000000 rows.
Please help! I apologize for any lack of text formatting.