Using MapReduce with german CSV format

2 ビュー (過去 30 日間)
Thomas
Thomas 2015 年 12 月 11 日
コメント済み: Thomas 2015 年 12 月 11 日
I try to use the MapReduce function to handel CSV files. My cells are seperated with ";" and are written in german format. e.g. header and 3 meassurements "k;temperature 0;20,4 1;20,8 2;21,1" not the englisch format "k,temperature 0,20.4 1,20.8 2,21.1" I found the option to use a ";" insted a "," for cell seperating by using mapreduce. But how to change the "." into "," for the numbers? I use Matlab 2015b. Thanks, TF

採用された回答

Kirby Fears
Kirby Fears 2015 年 12 月 11 日

その他の回答 (1 件)

Thomas
Thomas 2015 年 12 月 11 日
Thank you for the answer. Now I can read the numerical data as a string and convert it to a number. It works well for small amount of data. But I work with huge amount of Data (some GB „Big Data“). I compare it for a 25MB file. The computation time for a file with conversion (string too number) is 65 seconds and for a file without conversion (string to number) it is 1.5 seconds. Is there no other way to read my data directly as numbers? Thanks, TF
  2 件のコメント
Kirby Fears
Kirby Fears 2015 年 12 月 11 日
Are you first setting up your input with the datastore() command?
Unfortunately datastore properties do not allow you to set the decimal character.
Thomas
Thomas 2015 年 12 月 11 日
Yes. I use datastore to read my data. Thanks for help.
So it has to be a task for Mathworks to add these option.

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

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by