I have a pandas dataframe:
col1 col2 col3
a NaN NaN
b 1 2
b 3 4
c 5 6
I would like to change it to a dataframe like this:
col1 col2 col3
a NaN NaN
b [1,3] [2,4]
c 5 6
Is there a simple way to achieve this?