I have this in pandas
:
a b c
0 A 1 6
1 A 2 5
2 B 3 4
3 B 4 3
4 B 5 2
5 C 6 1
and I want to tranform it to this:
a b c
0 A [1, 2] [6, 5]
1 B [3, 4, 5] [4, 3, 3]
2 C [6] [1]
What is the most efficient way to do this?