title: Combine two columns under one header in Numpy array
body: <p>I have two Numpy arrays which I need to combine maintaining only certain columns from <code>A</code> - size <code>(888, 1114253)</code>, depending on the rows I have in <code>B</code> - size <code>(555861, 3)</code>.</p>
  
  <p>The problem is that the header of <code>A</code> is <code>55730</code>: each column has two values!</p>
  
  <p>In other words I want to get only the columns of <code>A</code> where the header corresponds to the rows in <code>B</code>, but in <code>A</code> each column is "double"   </p>
  
  <p>An example will clarify:</p>
  
  <p><code>A</code>:</p>
  
  <pre><code>family id mum dad  rs1  rs2  rs3  rs4  rs5  rs6  rs7  rs8  rs9  rs10  rs11  rs12
       1  1   4   6   A T  A A  T T  C C  G G  A T  A G  A A  G A  T A  G G  C C 
       2  2   7   9   T A  G A  C T  C T  G A  T T  A A  A C  G G  T A  C C  C T 
       3  3   2   8   T T  G G  C T  C T  G G  A T  A G  A C  G G  T T  C C  C C 
       4  4   5   1   A A  A A  T T  C C  G A  T T  A A  A A  G A  T A  G C  C T 
  </code></pre>
  
  <p>Since in this file each <code>rsxxx</code> column header has two corresponding columns, I have to find a way to put them together, so I can read the file as an array</p>
  
  <p><code>B</code>:</p>
  
  <pre><code>1  rs1 2345
  1  rs2 2346
  2  rs5 2348
  4  rs8 2351
  4 rs12 2360
  </code></pre>
  
  <p>The desired output is</p>
  
  <p><code>Output</code>:</p>
  
  <pre><code> family id mum dad  rs1 rs2 rs5 rs8 rs12
    1      1   4   6  A T A A G G A A C C
    2      2   7   9  T A G A G A A C C T
    3      3   2   8  T T G G G G A C C C
    4      4   5   1  A A A A G A A A C T
  </code></pre>
  
  <p>Ideas?</p>
  
  <p>On the console</p>
  
  <p><code>B</code>:</p>
  
  <pre><code>array([['1', 'rs3094315', '752566'],
         ['1', 'rs12562034', '768448'],
         ['1', 'rs3934834', '1005806'],
         ..., 
         ['23', 'rs2032612', '21866491'],
         ['23', 'rs2032621', '21872738'],
         ['23', 'rs2032617', '21896261']], 
        dtype='&lt;S10')
  </code></pre>