Using MapReduce with german CSV format

1 view (last 30 days)
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

Accepted Answer

Kirby Fears
Kirby Fears on 11 Dec 2015

More Answers (1)

Thomas
Thomas on 11 Dec 2015
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 Comments
Kirby Fears
Kirby Fears on 11 Dec 2015
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 on 11 Dec 2015
Yes. I use datastore to read my data. Thanks for help.
So it has to be a task for Mathworks to add these option.

Sign in to comment.

Products

Community Treasure Hunt

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

Start Hunting!