Cannot Load CSV file

4 visualizzazioni (ultimi 30 giorni)
romulo alves
romulo alves il 31 Lug 2018
I am trying to load a csv file using the import tool.
It takes forever (like a weekend was not enough...).
I've included the screenshot of what I am doing.
The file has numbers from H2 to AEQ639774. From A1 to AEQ1 I have headers. From A2 to G639774 I have identifiers.
I was trying to first load the numbers into a numeric matrix, and then repeat the process for headers and identifiers separately. But not even this works.
The file is 1.28 GB.. so big but not that big.
My machine has 16gb ram so that should be enough.
I am probably doing something wrong!
Thanks in advance!

Risposta accettata

Adam Danz
Adam Danz il 31 Lug 2018
That sounds fishy. What version of matlab are you using? I assume the problem persists after exiting and rebooting Matlab.
You could try rehashing the toolbox cache in case 3rd party toolboxes are interfering.
You could use an alternative method of importing the data such as xlsread() which bypasses some of the processing done by the import tool.
  15 Commenti
Walter Roberson
Walter Roberson il 31 Lug 2018
The 'e' and 'r' are probably the reason that most numbers are coded as if they are strings.
What do you want done with the 'e' and 'r' ? Is it okay to treat both of them the same way as empty cells, by changing all three of them into NaN ?
Walter Roberson
Walter Roberson il 1 Ago 2018
The file turns out to be UTF8 encoded, because it contains accented characters at various points. That leads to some problems.
I started working with reading in the entire file at one time to process as a single string (there can be a lot of advantages to working that way), but I encountered a Mathworks bug with native2unicode at the point of 1 gigabyte of decoded characters.

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Text Data Preparation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by