I’ve been working with multiple CSV files that need to be combined, cleaned and transformed before further analysis. The combined dataset is around 3 GB, but the memory consumption becomes significantly higher when performing merge and groupby operations in Pandas.
I’ve tried specifying data types, removing unnecessary columns and processing files in chunks. While these changes have helped, some operations still cause the application to run out of memory.
Would switching to Polars or DuckDB be a better long-term solution, or are there additional ways to optimise Pandas for this kind of workload?
I’d appreciate hearing from anyone who has faced similar challenges while working with large datasets.
