Import large CSV file

Hello
I have a CSV file that has 239615 rows and 24 columns with 85 Mb size.
the first row is headers and the rest of it are numbers.
I tried the following methods:
1-readmatrix
2-readtable
3-Matlab import
all of them only read up to 238491 and ignored rest of it.
Does anyone have any idea how to read the whole file?
Cheers

4 comentarios

Rik
Rik el 18 de En. de 2021
Did you try reading it as text and parsing it yourself? I am not aware of any documented limit in the number of lines Matlab can read. Are you sure there are no empty lines?
Mathieu NOE
Mathieu NOE el 18 de En. de 2021
hi
I tested readcell without a problem (from a csv file created with 239615 x 24 random matrix values)
R2020b
Ive J
Ive J el 18 de En. de 2021
Editada: Ive J el 18 de En. de 2021
Unless you have some specific issues with your machine, your file is not even close to being large. Manually inspect your file (Notepad++ for instance) or just read it entirely by fileread and splitlines to see what's really going on with your file.
Walter Roberson
Walter Roberson el 18 de En. de 2021
xls files have a maximum of 65535 rows, but cvs files should not have that limitation.
As an experiment, try readmatrix with the 'Encoding', 'UTF-8' option.

Iniciar sesión para comentar.

Respuestas (1)

SM
SM el 19 de En. de 2021

0 votos

Thank you everyone
It seems there was a malfunction in microsoft excel.
It resolved spontaneously.

Etiquetas

Preguntada:

SM
el 18 de En. de 2021

Respondida:

SM
el 19 de En. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by