Skip to main content
Advancedhow it works Verified ~10 min

How would you process a 100 GB CSV file in Python on a machine with 16 GB of RAM?

Source: Python tutorial: data structures

Quick answerFree

Never load it whole. Stream it with the csv module, pandas read_csv(chunksize=...) or a streaming engine such as DuckDB, Polars or PyArrow. Read only needed columns with explicit dtypes, keep running aggregates or write each processed chunk to Parquet incrementally.

Detailed answer· ~360 words

Interview Prep

Unlock the full answer with Interview Prep

Get a ~360-word model answer, 5 key points, a visual explainer, 5 common mistakes and 5 follow-ups, plus 233 more Python questions.

Also in Pro (₹499 / 90 days).

Key points· 5 points

Interview Prep
Unlock with Interview Prep

Visual explainer· animated, step by step

Interview Prep
Unlock with Interview Prep

Common mistakes· 5

Interview Prep
Locked

Best practices· 4

Interview Prep
Locked

Likely follow-ups· 5 questions

Interview Prep
Unlock with Interview Prep

+ 233 more Python questions in Interview Prep, each with the full answer.

Discussion