Input:
Dataframe
col1 col2
item1 10
item1 20
item1 25
item2 56
item2 36
item3 1
Output:
List of List
[[10,20,25],[56,36],[1]]
Create Series of lists by groupby with GroupBy.apply and last convert it to list:
L = df.groupby('col1')['col2'].apply(list).tolist()
print (L)
[[10, 20, 25], [56, 36], [1]]
You can GroupBy col1 and extract lists from each group of on col2:
df.groupby('col1').col2.apply(list).values.tolist()
# [[10, 20, 25], [56, 36], [1]]