I have many repetitive index values in certain sequence. I want to fetch the 1st value of my index cell 'ID' and when ever that value repeats, then append that set of values to next column. Here my Index values repeat 4 times, so output will have 4 columns labeled from i=1,2,3,4...till N for N no. of repeat index sets.
The starting value of index cell will differ for other data sets, but the values will repeat in same sequence.
Sample Dataset: df
ID,1
7,0.060896109
10,0.384263675
27,0.780060081
43,0.583200572
57,0.139564176
73,0.595220898
91,0.828783841
7,0.39920022
10,0.157306146
27,0.29750421
43,0.742234942
57,0.971849921
73,0.346905033
91,0.996723279
7,0.192197827
10,0.922323942
27,0.033304593
43,0.462253505
57,0.282632609
73,0.553047118
91,0.07678817
7,0.428707324
10,0.250935035
27,0.529861617
43,0.982468147
57,0.473807591
73,0.340980584
91,0.436675534
Expected Output Sample:
ID,1,2,3,4
7,0.060896109,0.39920022,0.192197827,0.428707324
10,0.384263675,0.157306146,0.922323942,0.250935035
27,0.780060081,0.29750421,0.033304593,0.529861617
43,0.583200572,0.742234942,0.462253505,0.982468147
57,0.139564176,0.971849921,0.282632609,0.473807591
73,0.595220898,0.346905033,0.553047118,0.340980584
91,0.828783841,0.996723279,0.07678817,0.436675534


IDis index?