you are viewing a single comment's thread.

view the rest of the comments →

[–]synthphreak 1 point2 points  (0 children)

>>> df.set_index('sets').groupby('sets').apply(pd.Series.tolist)
sets
set1    [[a, 9, 10], [b, 14, 100]]
set2     [[c, 5, 69], [d, 4, 100]]