Please see my for_stack dataframe data which was saved via for_stack.to_pickle('for_stack')
As per following image I need to add a new column showing the amount of time between Timestamp (09:30) and 'Gap Lower Closed First' which would be 403 minutes for row 1.
I need to only do this for the first row of each day at 09:30 as highlighted. I would ideally like a new dataframe showing only the 09:30 entry for each day if this is possible?
Thanks for any help.
I have tried using the following (incorrect code) for a timedelta but just get a NaT
data['tvalue'] = data.index
data['delta'] = (data['Gap Lower Closed first'] - data['tvalue'])
'Gap Lower Closed first'
is dtype: datetime64[ns]