
Python读取多个G大小的CSV文件的方法
5星
- 浏览量: 0
- 大小:None
- 文件类型:None
简介:
本文介绍了如何使用Python高效地处理大型CSV文件(超过1GB),包括分块读取和内存优化技巧。
如下所示:import pandas as pd file = pd.read_csv(file.csv, iterator=True) while True: chunk = file.get_chunk(1000) print(chunk.head(10)) print(chunk.tail(10))
以上是使用Python读取大容量CSV文件的一种方法,希望能够为大家提供参考。
全部评论 (0)
还没有任何评论哟~


