title: How to import and arrange a data set separated by comma?
body: <p>This is a very specific question. I have data that looks like below but way much bigger than that and many many files (not only one file). </p>
  
  <pre><code>TOURERG_ID,RawDataID,IndexNo,IndexValue
  19003771,11,240,1.1858652499
  19003771,11,241,1.177533477
  19003771,11,242,1.1704270598
  19003771,11,243,1.1620838731
  19003771,11,244,1.1540253051
  19003771,11,245,1.1464526996
  19003771,11,246,1.1394576168
  19003771,11,247,1.1328267903
  19003771,11,248,1.1258228114
  19003771,11,249,1.1171001937
  
  19003771,11,249,1.1237839518
  19003771,11,250,1.1113389261
  19003771,11,251,1.0938118176
  19003771,11,252,1.0704340703
  19003771,11,253,1.0418955374
  19003771,11,254,1.0104241602
  19003771,11,255,0.97917606379
  19003771,11,256,0.95110409662
  19003771,11,257,0.9277733067
  19003771,11,258,0.90865127357
  
  19000693,11,240,1.1952986902
  19000693,11,241,1.1867360653
  19000693,11,242,1.1793816406
  19000693,11,243,1.1707059267
  19000693,11,244,1.1623008189
  19000693,11,245,1.1543825533
  19000693,11,246,1.1470470507
  19000693,11,247,1.1400880358
  19000693,11,248,1.1327804778
  19000693,11,249,1.1237839518
  
  19000693,11,252,1.0704340703
  19000693,11,253,1.0418955374
  19000693,11,254,1.0104241602
  19000693,11,255,0.97917606379
  19000693,11,256,0.95110409662
  19000693,11,257,0.9277733067
  19000693,11,258,0.90865127357
  19000693,11,259,0.89118257832
  19000693,11,260,0.87161311454
  19000693,11,261,0.84625725399
  </code></pre>
  
  <p>What I want to have is as below. 
  This means from each box, only keep the first value before the comma, add ID to it and _1 it the first one and _2 to the second and
  then keep all values after the last comma. </p>
  
  <pre><code>    ID_19003771_1   ID_19003771_2  ID_19000693_1   ID_19000693_2
  1.1858652499   1.1237839518    1.1952986902   1.0704340703
  1.177533477    1.1113389261    1.1867360653   1.0418955374
  1.1704270598   1.0938118176    1.1793816406   1.0104241602
  1.1620838731   1.0704340703    1.1707059267   0.97917606379
  1.1540253051   1.0418955374    1.1623008189   0.95110409662
  1.1464526996   1.0104241602    1.1543825533   0.9277733067
  1.1394576168   0.97917606379   1.1470470507   0.90865127357
  1.1328267903   0.95110409662   1.1400880358   0.89118257832
  1.1258228114   0.9277733067    1.1327804778   0.87161311454
  1.1171001937   0.90865127357   1.1237839518   0.84625725399
  </code></pre>
  
  <p>To be honest, I would not even know where to start </p>