I'm using pd.to_datetime()
with format=
argument which speeds up the processing as the function doesn't have to infer the format for each row.
However my format=
argument isn't working for times with AM/PM:
pd.to_datetime('01/10/2017 10:15:17 PM',format = '%m/%d/%Y %H:%M:%S %p')
gives:
Timestamp('2017-01-10 10:15:17')
The time should have been 22:15:17 since the original time has 'PM' Is there a bug in my code or is there an issue with the function.