* Может быть, это вам поможет.
import pandas as pd
l1= ['i','j']
l2 = [[1,2],
[1,3],
[3,2],
[4,5],
[5,6],
[7,8],
[9,10],
[101,1],
[102,105],
[102,4]]
df = pd.DataFrame(l2, columns=l1)
print(df)
df = df.groupby('i')['j'].apply(list).reset_index(level='i')
print(df)
## ### Output ####
#Before
i j
0 1 2
1 1 3
2 3 2
3 4 5
4 5 6
5 7 8
6 9 10
7 101 1
8 102 105
9 102 4
#After
i j
0 1 [2, 3]
1 3 [2]
2 4 [5]
3 5 [6]
4 7 [8]
5 9 [10]
6 101 [1]
7 102 [105, 4]