Good afternoon folks,
I am trying to convert the type of a column from object to time (not datetime)
I am using the following code, which only seems to change the formatting:
However, I also need to set the type to time by using something like. astype('time64') so that the data type is also changed.
I need to use the time to plot a scatter plot
Grateful for any assistance
Thank you
Talch
I am trying to convert the type of a column from object to time (not datetime)
I am using the following code, which only seems to change the formatting:
df['date_time_info'] = pd.to_datetime(df['date_time_info']).dt.strftime('%H:%M:%S')
However, I also need to set the type to time by using something like. astype('time64') so that the data type is also changed.
I need to use the time to plot a scatter plot
Grateful for any assistance
Thank you
Talch