Having the following DF:
df = pd.DataFrame({\'id\':[1,1,1,2,2,2,2], \'timestamp\':[\'2020-09-01 18:14:35\',\'2020-09-01 18:14:39\', \'2020-09-01 18:14:40\',\'