I have the below dataframe over which I am trying to group by and aggregate data.
Column_1 Column_2 Column_3
A N1 P1
A N2 P2
A N3 P3
B N1 P1
C N1 P1
C N2 P2
Required Output:
Column_1 Column_2 Column_3
A N1,N2,N3 P1,P2,P3
B N1 P1
C N1,N2 P1,P2
I am able to do it over one column by creating a window using partition and groupby. Then I use collect list and group by over the window and aggregate to get a column. THis works for one column.
How to perform the same over 2 columns. Kindly help