I have a dataframe that I would like grouped into rows based on time difference and differences between strings. The original dataframe effectively looks like this: