I am trying to convert a column in a dataFrame to a TD format. The column looks like this (they are currently strings):
01/11/2012 00:00
01/11/2012 01:00
01/11/2012 02:00
This is what I have done now:
df['Sdate'] = pd.to_datetime(df['Sdate'], format='%d%m%y %H:%M.%f')
But, it throws an error saying,
time data '01/11/2012 00:00' does not match format '%d%m%y %H:%M.%f' (match)
Not, sure why it does that. Isn't HH:MM 00:00 - 23:00?
Or, am I missing something really stupid here?
/, you don't need a microsecond directive, and%yshould be%Y; instead use'%d/%m/%Y %H:%M'.