I'm trying to reformat this so I can generate a dataframe of all instances of On Hold Begins
and the next event immediately after it. On Hold Begins
is the start an event, and I'd like to capture its Timestamp
and Deviation
as well as the Timestamp
and Deviation
for the next event immediately after it (i.e. Below Thresold
, Stage Enabled
).
If possible, I only want to include slices that have On Hold Begins
as the first event (so the ideal solution would not include rows 1 &2 above), do not want the additional X columns, and would want it to be formatted as I described.
This is similar to: How can I spread repeated measures of multiple variables into wide format?, but I ran into errors asking for a dictionary when I tried it.
Thank you all so much for the help.