I have given up on my code and would hear if anyone had a suggestion as how to get the results I am seeking. I have a dataframe consisting of three variables: date_time, ID,