My dataframe "d" is:
import pandas as pd
d=pd.DataFrame(columns=['Status','t'])
d['Status']=['A','T', 'A','C','C','A','T','A','C','A']
d['t']= pd.to_datetime(['2021-06-12 08:39:24.813000',
'2021-06-12 08:39:24.820000',
'2021-06-12 08:39:25.210000',
'2021-06-12 08:39:25.217000',
'2021-06-12 08:44:28.830000',
'2021-06-12 10:48:10.293000',
'2021-06-12 10:48:10.300000',
'2021-06-12 10:48:10.680000',
'2021-06-12 10:48:10.693000',
'2021-06-12 10:48:11.223000'])
How can I get a column "Delta" which calculates the difference in time between pairs of values "T" (Trigger) and "C" (end)? It should look like this:
