We will see:
212,243 row values * 2500 col values * 8 bytes/value = 4,244,860,000 bytes = 4GB
To save all memory in memory, you will need memory.
If it were Java, I would recommend that you increase the maximum heap on your JVM. I don't know what the analogy is for Python.
source share