我有一个读取csv文件的脚本,其中包含非常大的字段:
# example from http://docs.python.org/3.3/library/csv.html?highlight=csv%20dictreader#examples
import csv
with open('some.csv', newline='') as f:
reader = csv.reader(f)
for row in reader:
print(row)但是,这会在某些csv文件上抛出以下错误:
_csv.Error: field larger than field limit (131072)如何分析包含大量字段的csv文件?跳过包含大字段的行不是一个选项,因为需要在后续步骤中分析数据。
https://stackoverflow.com/questions/15063936
复制相似问题