I have a column in my dataframe which has time in format "%H:%M:%S". and i want to get time difference in numeric.
what i have tried is-
t = df['time [h:m:s GMT]'] #column in dataframe
dfdt = []
for i in range(2,len(t)-1):
dfdt1 = pd.to_numeric(t[i+1]-t[i]) #want to get output in numeric
actual values on dataframes are -
15:49:35 - 15:49:31 #desired output is 4
it is giving an error-
TypeError: unsupported operand type(s) for -: 'str' and 'str'
can anyone help me with this problem?