title: How to transpose the csv file data based on series of group data items
body: <p>Need some help on python code related to transpose. Have one csv file looking below (<code>a1</code>&amp;<code>b1</code>,<code>a2</code>&amp;<code>b2</code>,<code>c1</code>&amp;<code>c2</code>,<code>d1</code>&amp;<code>d2</code> are like groups)</p>
  <pre><code>r1;a1;b1;a2;b2;c1;c2;d1;d2
  12;ec;em;ed;em;ec;ek;;
  23;ec;ek;ec;rk;;;;
  34;ec;rk;ec;jk;ek;45;;
  </code></pre>
  <p>Need to get the output file as</p>
  <pre><code>12;ec;em
  12;ed;em
  12;ec;ek
  23;ec;ek
  23;ec;rk
  34;ec;rk
  34;ec;jk
  34;ek;45
  </code></pre>