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

1 回表示 (過去 30 日間)
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 件のコメント
Cedric
Cedric 2013 年 4 月 13 日
編集済み: Cedric 2013 年 4 月 13 日
What part of Per answer here did you not understand?
Randy Souza
Randy Souza 2013 年 4 月 15 日
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.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2013 年 4 月 13 日
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 件)

カテゴリ

Help Center および File ExchangeTrading Technologies についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by