I want to combine the rows of dataframe with the same group and assign the values to new columns
Before
x y group
0 0.333333 1.000000 0
1 0.750000 0.137931 0
2 1.000000 0.270115 0
3 0.272727 1.000000 1
4 0.727273 0.124294 1
5 1.000000 0.355932 1
6 0.272727 1.000000 2
7 0.727273 0.096591 2
8 1.000000 0.363636 2
9 0.272727 1.000000 3
10 0.727273 0.105556 3
11 1.000000 0.416667 3
12 0.272727 1.000000 4
13 0.727273 0.181818 4
14 1.000000 0.443182 4
After
x1 y1 x2 y2 x3 y3
0.333333 1.000000 0.750000 0.137931 1.000000 0.270115
0.272727 1.000000 0.727273 0.124294 1.000000 0.355932
0.272727 1.000000 0.727273 0.096591 1.000000 0.363636
0.272727 1.000000 0.727273 0.105556 1.000000 0.416667
0.272727 1.000000 0.727273 0.181818 1.000000 0.443182