Please can someone help me with the correct way to convert "hh:mm:ss AM/PM" Object column to Timestamp. E.g. Input = "06:12:39 PM" Expected Output = 18:12:39
I tried the below already:
df['col'] = pd.to_datetime(df.col,format='%H:%M:%S %p').dt.time
However I am getting output = 06:12:39 with the datatype unchanged
Not sure where I am going wrong here. Thank you.