I have a large dataframe which looks as following:
Mo Gr Data
9 A 36
9 A 26
4 A 16
4 A 145
9 B 173
7 A 41
4 A 13
I want to pivot it get list such that:
Mo Gr List
4 A [16, 145, 13]
7 A [41]
9 A [36, 26]
9 B [173]
I am not sure how to approach this problem?