How can I extract only 3 columns from a large CSV without running out of memory?

1 vue (au cours des 30 derniers jours)
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 commentaires
Cedric
Cedric le 13 Avr 2013
Modifié(e) : Cedric le 13 Avr 2013
What part of Per answer here did you not understand?
Randy Souza
Randy Souza le 15 Avr 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.

Connectez-vous pour commenter.

Réponse acceptée

Image Analyst
Image Analyst le 13 Avr 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.

Plus de réponses (0)

Catégories

En savoir plus sur Trading Technologies dans Help Center et File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by