How can I extract only 3 columns from a large CSV without running out of memory?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have huge CSV files containing financial trade prices. The CSV files (when opened in excel), show 5 columns. I want to extract only columns 1, 3 and 5 (Date in form of mm/dd/yyyy, prices up to 2 decimal places 51.44 and volume which is a whole number).
As you can understand with only 16GB RAM, I run out of memory very easily when dealing with CSV of sizes 16GB itself (16GB being the extreme example of what I have).
Can anybody tell me how I can extract these 3 columns without running out of memory and show me how to code it?
2 comentarios
Randy Souza
el 15 de Abr. de 2013
I restored the original text of this question.
@Mate 2u: If you have a new question please ask it by creating a new question. If you overwrite an existing question, (1) answerers are not likely to find it, and (2) anyone who finds the question in the future will be confused because the answer makes no sense relative to the question.
Respuesta aceptada
Image Analyst
el 13 de Abr. de 2013
Didn't we already discuss this? http://www.mathworks.com/matlabcentral/answers/71837#comment_142995 To recap, read a line at a time and pull out only those numbers on the line that you need, and put them into the smallest variable possible.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Transaction Cost Analysis en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!