python - MemoryError:无法为形状为 (108, 2260668) 且数据类型为 float64 的数组分配 1.82 GiB
问题描述
运行代码时:
loan_data = pd.concat([loan_data, loan_data_dummies], axis = 1)
我收到以下错误消息:
MemoryError: Unable to allocate 1.82 GiB for an array with shape (108, 2260668) and data type float64
我尝试了这些步骤:
Windows 10
Press the Windows key
Type SystemPropertiesAdvanced
Click Run as administrator
Under Performance, click Settings
Select the Advanced tab
Select Change...
Uncheck Automatically managing paging file size for all drives
Then select Custom size and fill in the appropriate size
Press Set then press OK then exit from the Virtual Memory, Performance Options, and System Properties Dialog
Reboot your system
按照这里的说明;无法分配具有形状和数据类型的数组
我分配了 8000 MB 到驱动器 C 和 2000 到驱动器 D,不知道如何分配我的 11000 MB 内存以阻止错误发生?
解决方案
推荐阅读
- php - 根据用户角色向未登录用户显示 WooCommerce 折扣的可能折扣
- javascript - 有没有一种简单的方法来提及所有 Discord 用户的角色?
- sql - oracle sql:“获取或插入”存储过程
- python - list_filter 以选择作为值
- javascript - 我试图通过改变宽度来隐藏数组中的所有元素。在函数内部使用了 setInterval 但它只对最后一个元素正确运行
- prolog - Prolog:查找并放入列表中的重复项
- c++ - 将彩色文本绘制到 c++ win32
- java - 如何在 JAVA 中从 Azure Functions 中引用文件?
- excel - 将不同的工作表合并为具有相同结构的工作表
- c# - 在“离开”文本框后将十六进制字符串格式化为字节数组