I am trying to convert a column with data like this: 1:38:17 or 36:21 to timedelta format. This column is extracted from a website and converted to a table using pandas.
df[' Chip Time'] = df[' Chip Time'].apply(pd.to_timedelta, errors='coerce')
This returns 0 days 01:38:17 but for rows with minutes and seconds (36:21) it returns NaT. I would like to have the time properly converted and remove the days part leaving only the time like this: 01:38:17.
I tried using the code below but it doesn't strip the days but it strips the time.
df[' Chip Time'] = pd.to_timedelta(df[' Chip Time'].dt.days, unit='d')
Please is there another method I can use in order to return a result like this 01:38:17.