Junior — Middle
Can you tell about the most complex technical problem you faced and how you overcame it?
sobes.tech AI
Answer from AI
Once I needed to optimize a script for processing large CSV files that was running too slowly and consuming a lot of memory.
I decided:
- To use generators for line-by-line data processing to avoid loading the entire file into memory.
- To apply the
pandasmodule for efficient data handling, but with chunked reading (chunksize). - To parallelize processing using the
concurrent.futuresmodule.
As a result, the script became significantly faster and used less memory, allowing me to process files several gigabytes in size without crashes.