How can I split a large file csv file (7GB) in Python

前端 未结 5 1729
我在风中等你
我在风中等你 2020-12-23 22:34

I have a 7GB csv file which I\'d like to split into smaller chunks, so it is readable and faster for analysis in Python on a notebook. I would like to grab a sm

5条回答
  •  渐次进展
    2020-12-23 22:48

    You don't need Python to split a csv file. Using your shell:

    $ split -l 100 data.csv
    

    Would split data.csv in chunks of 100 lines.

提交回复
热议问题