I have a timestamp column (Time) where the timestamp is in the following format
0 02.28.2020 10:21:26.0734 vorm.
1 02.28.2020 10:21:27.0720 vorm.
2 02.28.2020 10:21:30.0705 vorm.
3 02.28.2020 10:21:31.0742 vorm.
4 02.28.2020 10:21:32.0606 vorm.
3978 02.28.2020 11:30:11.1122 vorm.
3979 02.28.2020 11:30:12.1078 vorm.
3980 02.28.2020 11:30:13.1100 vorm.
3981 02.28.2020 11:30:14.1190 vorm.
3982 02.28.2020 11:30:15.1086 vorm.
Name: Time, Length: 3983, dtype: object
I tried to convert the string object in Timestamp object in the following manner:
df['Time'] = [datetime.datetime.strptime(d, "%d.%m.%Y %H:%M:%S.%f %p.") for d in df["Time"]]
But I get the following error:
ValueError: time data '02.28.2020 10:21:26.0734 vorm.' does not match format '%d.%m.%Y %H:%M:%S.%f %p.'
I assume that the error comes from "vorm.", which is the indication for "AM".