title: Append a Header for CSV file?
body: <p>I am trying to add a header to my CSV file.</p>
  
  <p>I am importing data from a .csv file which has two columns of data, each containing float numbers. Example:</p>
  
  <pre class="lang-none prettyprint-override"><code>  11   22
    33   44
    55   66
  </code></pre>
  
  <p>Now I want to add a header for both columns like: </p>
  
  <pre class="lang-none prettyprint-override"><code> ColA  ColB
    11    22
    33    44
    55    66
  </code></pre>
  
  <p>I have tried this: </p>
  
  <pre><code>with open('mycsvfile.csv', 'a') as f:
      writer = csv.writer(f)
      writer.writerow(('ColA', 'ColB'))
  </code></pre>
  
  <p>I used <code>'a'</code> to append the data, but this added the values in the bottom row of the file instead of the first row. Is there any way I can fix it?</p>