Read row by row CSV file

What is the best way to read large CSV file on demand, i.e. line by line, instead of loading the whole data into memory?
I'm using 'csv' crate which seems uploads all the data at once into memory.

If you're using the csv crate, then you'd have to go out of your way to read the entire file into memory.

Please show some code using the csv crate that others can run and test themselves, and describe the problems you're having with it specifically.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.