Using MapReduce with german CSV format

2 visualizaciones (últimos 30 días)
Thomas
Thomas el 11 de Dic. de 2015
Comentada: Thomas el 11 de Dic. de 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

Respuesta aceptada

Kirby Fears
Kirby Fears el 11 de Dic. de 2015

Más respuestas (1)

Thomas
Thomas el 11 de Dic. de 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 comentarios
Kirby Fears
Kirby Fears el 11 de Dic. de 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 el 11 de Dic. de 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.

Iniciar sesión para comentar.

Categorías

Más información sobre Large Files and Big Data en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by