My code (shown below) takes each row in the dataframe and assigns it to a group based on time and distance criteria. The group is based on numerical identifiers in a new col