为什么pandas.to_parquet需要这么多RAM?
除了使用512GB RAM(并且没有其他运行)的机器时,尝试保存Pandas DF(DF.TO_PARQUET(...)
,如何使用512GB RAM(和其他任何东西)的机器) )具有对象大小(sys.getSizeof
)“仅” 〜25GB? DF是〜73mm的2列行,其中之一是一个英语自然语言句子,另一个是字符串ID。
使用Engine ='FastParquet'
,它只是在溢出的错误中退出;借助默认Pyarrow
,它可以用完存储器。在这两种情况下,compresssion
设置(默认,gzip
或none
)都不会改变各自的行为。结果相同3次。
Wisdom of such a use case aside... how come a machine with 512Gb RAM (and nothing else running) run out of memory while trying to save a pandas df (df.to_parquet(...)
) that has object size (sys.getsizeof
) "only" ~25Gb? The df is ~73mm rows by 2 columns, one of them is one English natural-language sentence, the other string id.
With engine='fastparquet'
, it just quits with an error about overflow; with default pyarrow
it runs out of memory. In both cases, compresssion
setting (default, gzip
or None
) does not change that respective behavior. Same result 3 times.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论