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 How to add a new column to a CSV file using Python?
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.