I have a data frame like so
id val1 val2 0 A B 1 C D 1 E F 2 G H and trying to reshape into...
id val1 val2 val3 val4 0 A B 1 C D E F 2 G H It doesn't matter what the additional column names are and I may not know how many duplicates there are of each id, so I may not know exactly how many columns to add.
Any advice for solving a problem like this? I've been trying to use pandas and groupBy, but I'm not constrained to either. Thanks!