I have the following dataframe df:
d = {\'ID\':[1,1,2],\'event\':[\'e\',\'c\',\'e\'],\'variable1\':[10,20,20