I'm trying to convert a column of my Pandas DataFrame that is in the format 09:18 PM
to 21:18:00
. It (sort of) worked with:
df['Time'] = pd.to_datetime(df['Time'], format="%I:%M %p")
But the output is, now:
df['Time']
1900-01-01 21:18:00
I already have columns for Year, Month and Day, so I'd like to get back only H:M:S without 1900-01-01 included.
Any help is much appreciated.