title: Find number of rows in large .csv file using python
body: <p>I am working with very large .csv files and am attempting to find the number of lines in the file as well as other things such as parsing into json, etc. </p>
  
  <p>my question is how do I overcome the limitations of the csv library because I am constantly receiving the following error. </p>
  
  <p>I am providing a sample program that I know to work in python3 that will return the number of rows in the csv file. </p>
  
  <pre><code> import csv
  
      input = 'large-input.csv'
      with open(input ,"r") as f:
          reader = csv.reader(f,delimiter = ",")
          data = list(reader)
          row_count = len(data)
          print(row_count)
  </code></pre>
  
  <p>however, I continue getting this error when run against a 1.5GB csv file. </p>
  
  <pre><code>Traceback (most recent call last):
    File "csv-len.py", line 6, in &lt;module&gt;
      data = list(reader)
  _csv.Error: field larger than field limit (131072)
  </code></pre>
  
  <p>Any work-arround this issue is greatly appreciated. thanks!</p>