Using MapReduce with german CSV format

2 Ansichten (letzte 30 Tage)
Thomas
Thomas am 11 Dez. 2015
Kommentiert: Thomas am 11 Dez. 2015
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

Akzeptierte Antwort

Kirby Fears
Kirby Fears am 11 Dez. 2015

Weitere Antworten (1)

Thomas
Thomas am 11 Dez. 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 Kommentare
Kirby Fears
Kirby Fears am 11 Dez. 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 am 11 Dez. 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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Large Files and Big Data finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by