admin管理员组文章数量:1123589
please tell me how to fix the error: "MemoryError: Unable to allocate 65.3 GiB for an array with shape (8763449844,) and data type int64"
I have 2 small tables:
Data columns (total 6 columns):
# Column Dtype
--- ------ -----
0 ART_GRP_LVL_2_ID int32
1 cluster object
2 cluster new int32
3 traffic int32
4 WHS_ID int32
5 opsum int32
dtypes: int32(5), object(1)
memory usage: 224.7+ MB
Data columns (total 4 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 ART_GRP_LVL_2_ID 752375 non-null int32
1 ART_GRP_LVL_0_NAME 752375 non-null object
2 ART_GRP_LVL_1_NAME 752375 non-null object
3 ART_GRP_LVL_2_NAME 752375 non-null object
dtypes: int32(1), object(3)
memory usage: 20.1+ MB
pd.merge(for_bottom_up, v_art_ext, on = 'ART_GRP_LVL_2_ID', how = 'left')
Why is there such an error, why is so much memory needed when merge? Thanks
changed all data types from int64 to int32, but the error is still int64
本文标签: pythonMemoryError Unable to allocateStack Overflow
版权声明:本文标题:python - MemoryError: Unable to allocate - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736584791a1944997.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论