title: Retype csv file in python
body: <p>I got a csv file with two headers, and I don't know how to express it either, I pasted it and this is what it looks like, I need to reorder it to be a normal csv file,No information in &quot;age&quot; key，I just want to retrieve &quot;name&quot; and &quot;age&quot;，I need to output &quot;first_name&quot;,&quot;last_name&quot;,&quot;age&quot;. And use &quot;first_name&quot;,&quot;last_name&quot;,&quot;age&quot; as the title，</p>
  <pre><code>&quot;ID&quot;,&quot;meta_key&quot;,&quot;meta_data&quot;
  1,&quot;nickname&quot;,&quot;dale ganger&quot;
  2,&quot;first_name&quot;,&quot;ganger&quot;
  3,&quot;last_name&quot;,&quot;dale&quot;
  4,&quot;age&quot;,
  5,&quot;sex&quot;,&quot;F&quot;
  6,&quot;nickname&quot;,&quot;dale ganger&quot;
  7,&quot;first_name&quot;,&quot;ganger&quot;
  8,&quot;last_name&quot;,&quot;dale&quot;
  9,&quot;age&quot;,
  10,&quot;sex&quot;,&quot;F&quot;
  11,&quot;nickname&quot;,&quot;dale ganger&quot;
  12,&quot;first_name&quot;,&quot;ganger&quot;
  13,&quot;last_name&quot;,&quot;dale&quot;
  14,&quot;age&quot;,
  15,&quot;sex&quot;,&quot;F&quot;
  
  </code></pre>
  <p>I used this code, but it doesn't merge the headers,</p>
  <pre><code>import pandas as pd
  pd.read_csv('input.csv', header=None).T.to_csv('output.csv', header=False, index=False)
  </code></pre>
  <p>output</p>
  <pre><code>ID,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
  meta_key,nickname,first_name,last_name,age,sex,nickname,first_name,last_name,age,sex,nickname,first_name,last_name,age,sex
  meta_data,dale ganger,ganger,dale,,F,dale ganger,ganger,dale,,F,dale ganger,ganger,dale,,F
  
  </code></pre>
  <p>The final look I want</p>
  <pre><code>nickname,first_name,last_name,age,sex
  dale ganger,ganger,dale,,F
  dale ganger,ganger,dale,,F
  dale ganger,ganger,dale,,F
  </code></pre>