Filter löschen
Filter löschen

In expressions of the form T.X = B where T is a tall table, B must be a tall array.

1 Ansicht (letzte 30 Tage)
Hello,
I am trying to convert a tall array with a column of strings to numbers. I tried this:
ds = datastore(fullfile(p,'tallFinal.csv')); % CREATE A DATASTORE
ds.SelectedFormats={'%q','%C','%C','%s'}; % DEFINE COLUMN FORMATS
ds.VariableNames = {'DATE','TICKER','FIELD','VALUE'}; % DEFINE COLUMN NAMES
tds = tall(ds); % CREATE A TALL ARRAY
tmp = str2double(tds.VALUE); % CONVERT TO STRING
[tds.fVALUE]=gather(tmp);
And recieved an error after over two hours of processing.
Evaluating tall expression using the Parallel Pool 'local':
- Pass 1 of 2: Completed in 10 min 50 sec
- Pass 2 of 2: Completed in 2 hr 11 min
Evaluation completed in 2 hr 22 min
In expressions of the form T.X = B where T is a tall table, B must be a tall array.
Thank You,
Michael
  7 Kommentare
Walter Roberson
Walter Roberson am 6 Sep. 2019
The error message above says there is a 'IG8 \n' in input.
Michael
Michael am 8 Sep. 2019
Hello,
1) I attached some data.
2) tall(str2double(... didn't work.
3) I don't understand what you mean by "'IG8 \n"
ds = datastore(fullfile(p,'tallFinal.csv')); % CREATE A DATASTORE
ds.SelectedFormats={'%q','%C','%C','%s'}; % DEFINE COLUMN FORMATS
ds.VariableNames = {'DATE','TICKER','FIELD','VALUE'}; % DEFINE COLUMN NAMES
tds = tall(ds); % CREATE A TALL ARRAY
tmp = tall( str2double(tds.VALUE)); % CONVERT TO NUMBER
[tds.fVALUE]=gather(tmp);
Evaluating tall expression using the Parallel Pool 'local':
- Pass 1 of 2: Completed in 11 min 49 sec
- Pass 2 of 2: Completed in 2 hr 5 min
Evaluation completed in 2 hr 17 min
In expressions of the form T.X = B where T is a tall table, B must be a tall array.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Parallel Computing Fundamentals finden Sie in Help Center und File Exchange

Produkte


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by