【发布时间】:2021-05-23 16:28:40
【问题描述】:
我正在使用 Dask 在 python 中读取一个大文本文件以提高内存性能。
我正在使用 df.compute() 将 Dask 数据帧转换为 Pandas 以执行 Pandas 的大量转换。我看到df.compute() 之后的内存使用量(guppy3)增加了5x。
df = dd.read_csv('some_big_file - Copy.csv', sep = '|', names = names)
j = hpy()
print(j.heap())
##checked only 45mb memory
df = df.compute()
j = hpy()
print(j.heap())
##Checked almost 230mb memory usage
我错过了什么?
【问题讨论】: