Interview practice question
Script crashes reading a big CSV
Data Engineering · Python · Beginner
Your Python script crashes with a memory error when reading a 15 GB CSV with pandas. What do you do?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Don't load the whole file at once.
- Use chunksize and process chunk by chunk.
- Read only needed columns with usecols and set dtypes.
- Convert to Parquet for repeated use.
- Or use DuckDB or Polars which handle large files efficiently.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.