title: Need to sort columns based on row
body: <p>I need to sort columns based on first row. Can anyone help me in achieve this for example. Basically I have a csv.</p>
  
  <p>I have a matrix like:-</p>
  
  <pre><code>B,    C,    D,    E,    A
  1,    11,   12,   23,   67
  111,  112,  114,  118,  200
  </code></pre>
  
  <p>I want this matrix to be sorted using row 1, so A should come at first and so the same columns in other rows.</p>
  
  <pre><code>A,    B,   C,     D,   E   
  67,   1,   11,    12,   23
  200,  111, 112,  114,  118
  
  
  CSV Input:-  B,C,D,E,A\n1,11,12,23,67\n,111,112,114,118,200
  CSV Output:- A,B,C,D,E\n67,1,11,12,23\n,200,111,112,114,118
  </code></pre>
  
  <p>Can someone help me or guide me how to achieve the same.</p>