I'm trying to organise a CSV file with 30 columns and 1000 rows. I want to concatenate the rows column by column if the 1st column is the same, using a vertical line (|).
Input:
3,XX,YY,123,1234,MM,-,,DD,1235,XC
3,XM,YM,123,1234,MD,-,A,FD,1233,XC
3,XN,YN,123,1234,MM,-,,ED,1235,XC
Output:
3,XX|XM|XN,YY|YM|YN,123,1234,MM|MD,-,A,DD|FD|ED,1235|1233,XC
So I only want to concatenate the different values.
I had a look at this thread but wasn't helpful for my problem?