I run a function that return 500 Polars LazyFrames. My goal is to concatenate them all together and call the collect_all() method to cast to a Polars DataFrame:
ret_concat = pl.concat(pl.collect_all(ret,streaming=True), rechunk=True)
ret
is a list of 500 LazyFrames. When I run the htop command I noticed only 8 out of the 64 cores are being used to the maximum capacity.
Image of RAM/CPU utilization
Is it possible for me to utilize the other 56 any more?
I tried leveraging the multiprocesing library. This process took much longer than I expected and I am starting to realize multiprocessing may not work well with polars in the few scenarios I have tried.
tastycakezs is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.