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 CenterFile Exchange에서 Large 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