I have a dataframe as :
1 A1
1 A11
2 A2
2 A22
2 A23
3 A3
3 A33
4 A4
4 A44
4 A444
5 A5
What I need is :-
1 | A1, A11
2 | A2, A22, A23
3 | A3, A33
4 | A4, A44, A444
5 | A5
ie. each column can have different number of rows present.
Anyway I can collapse them elegantly, without using the reading from dict and then concat to the list as applicable. In the traditional sense I need to perform multiple joins on this - Any way around ?
Note that there should be only 2 final columns.