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

后端 未结 8 1901
有刺的猬
有刺的猬 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

    Below is to check the current limit

    csv.field_size_limit()
    

    Out[20]: 131072

    Below is to increase the limit. Add it to the code

    csv.field_size_limit(100000000)
    

    Try checking the limit again

    csv.field_size_limit()
    

    Out[22]: 100000000

    Now you won't get the error "_csv.Error: field larger than field limit (131072)"

    0 讨论(0)
  • 2020-11-28 19:58

    Find the cqlshrc file usually placed in .cassandra directory.

    In that file append,

    [csv]
    field_size_limit = 1000000000
    
    0 讨论(0)
提交回复
热议问题