当前位置:主页 > 软件编程 > Python代码 >

python读取几个G的csv文件方法

时间:2021-09-03 09:19:16 | 栏目:Python代码 | 点击:

如下所示:

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))
 

您可能感兴趣的文章:

相关文章