Cannot Load CSV file
4 次查看(过去 30 天)
显示 更早的评论
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!
0 个评论
采纳的回答
Adam Danz
2018-7-31
That sounds fishy. What version of matlab are you using? I assume the problem persists after exiting and rebooting Matlab.
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 个评论
Walter Roberson
2018-7-31
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
2018-8-1
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.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Text Data Preparation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!