I have a dataframe. There are several time-related columns in it. They are displayed like Unix time, but they are not exactly!!
Example: I have 18052508 as a TotalTime,
119628 as LapTime
the LapTime makes sense to be 1m.19sec.628 however the 18052508 should be something around five hours plus.
How can I convert them to right time. I need them later for plotting and filtering
I tried
pd.to_datetime(df_stx['TotalTime'],unit='ms').dt.strftime('%H:%M:%S:%f').str[:-3]
pd.to_datetime(df_stx['TotalTime'],unit='ms')
pd.to_datetime(data['TotalTime'])
data['TotalTime'].dt.strftime("%H:%M:%S")
pd.to_datetime(df_stx['TotalTime'])
# this line changed the 18052508 to
1970-01-01 00:00:00.018052508
non of them gave me anything right.or they look fine at begging but when comes to plotting they won't work.