当我想使用python的pd.get_dummies
生成虚拟变量时,报错说内存不够。
发现忘记给连续变量进行分箱了,导致需要的内存极大。一定需要先对连续变量进行分箱啊。
MemoryError: Unable to allocate 32.6 GiB for an array with shape (114149, 306215) and data type uint
![](https://img-home.csdnimg.cn/images/20240711042549.png)
当我想使用python的pd.get_dummies
生成虚拟变量时,报错说内存不够。
发现忘记给连续变量进行分箱了,导致需要的内存极大。一定需要先对连续变量进行分箱啊。