How to deal with millions or rows of data for analysis/visualization purpose
Pandas load everything into memory before it starts working and that is why your code is failing as you are running out of memory. One way to deal with this issue is to scale your system i.e. have more RAM but this is not a good solution as this method will eventually fail to scale.

Other option will be to use big data libraries like spark or flink for this on a distributed system. You can try the installation on windows sever but that also wont scale well for you.