_csv.Error: field larger than field limit (131072)

后端 未结 8 1995
有刺的猬
有刺的猬 2020-11-28 19:10

I have a script reading in a csv file with very huge fields:

# example from http://docs.python.org/3.3/library/csv.html?highlight=csv%20dictreader#examples
i         


        
8条回答
  •  悲哀的现实
    2020-11-28 19:54

    This could be because your CSV file has embedded single or double quotes. If your CSV file is tab-delimited try opening it as:

    c = csv.reader(f, delimiter='\t', quoting=csv.QUOTE_NONE)
    

提交回复
热议问题