title: add header to tab delimited csv file with python
body: <p>I have a  tab delimited CSV file. It does not have any header. How can I add a header? this is what I have tried. getting a memory error.
  I am using Jupyter and python 3.6.*</p>
  
  <pre><code>import csv
  with open('main_file.csv',newline='') as f:
      r = csv.reader(f)
      data = [line for line in r]
  with open('file.csv','wb',newline='') as f:
      w = csv.writer(f, delimiter='\t')
      w.writerow(['a', 'b','c','d','e','f'])
      w.writerows(data)
  </code></pre>
  
  <p>my csv data example</p>
  
  <pre><code>    1    2    3    4
      5    6    7    8
      9    10    11    12
  </code></pre>