title: How to write csv in python efficiently?
body: <p>I am working on calculating tf-idf in a large document. The number of words I have is more than 80,000. I am trying to write sparse matrix in a csv file. I am using code similar to answered here <a href="https://stackoverflow.com/a/11070638/1496376">How to add a new column to a CSV file using Python?</a></p>
  
  <p>The output file is too big in size, exceeding 700 MB for about 30,000 words only. 
  So, my question is how to write it efficiently? 
  Thank you.</p>