I have a df
df = pd.DataFrame({\'group\':[\'a\',\'a\',\'b\',\'b\',\'c\',\'c\',\'c\'], \'score\':[1,2,3,4,5,6,7]}) group score 0 a 1 1 a 2 2 b 3 3 b