I have a dataframe that looks like this:
Value group_id
23 1
28 1
32 1
....
35 12
23 12
42 12
There are 6 unique group_id in total, each with few hundred elements. I want to convert this into a dataframe that has the value for a single 'group_id' in one single row. So I want my dataframe to look like this:
value_1 value_2 value_3 group_id
23 28 32 1
....
35 23 42 12
I tried using pandas.melt and pandas.groupby but failed to get any results.