I have a csv file with a column named timestamps that has timestamps as follows:
2023-01-26 06:00:00+00:00
I would like to convert the timestamps col into datetime as it currently is an object.
When I run the following code
time = df_usage.iloc[i][timestamps]
time = datetime.datetime.strptime(time, '%Y-%m-%d %H:%M:%S+')
I get ValueError: unconverted data remains: 00:
After seconds is milliseconds but Python does not appear to have a millisecond directive. Does anyone have a suggestion for a workaround or a simple way to eliminate all time after seconds in the timestamp column? (i.e. turn 2023-01-26 06:00:00+00:00 into 2023-01-26 06:00:00)?