I try to read the attached csv file using readtable. But the data does not seem to be read. What can be done?

 채택된 답변

Walter Roberson
Walter Roberson 2021년 4월 14일

0 개 추천

readcell() instead of readtable(). Your file mixes data types.

추가 답변 (1개)

Thomas Jensen
Thomas Jensen 2021년 4월 14일

0 개 추천

Hi,
Try to use readtable('test.csv','Format','%s,%s'). It will force the data to be treated as text.
Since you columns are mixing number and date values, it is better to keep it as char and post-process it later.

댓글 수: 1

alpedhuez
alpedhuez 2021년 4월 14일
Error using readtable (line 245)
Unable to read the entire file. You may need to specify a different format, delimiter, or number of header lines.
Note: readtable detected the following parameters:
'Delimiter', ',', 'HeaderLines', 0, 'ReadVariableNames', true

댓글을 달려면 로그인하십시오.

카테고리

제품

태그

질문:

2021년 4월 14일

답변:

2021년 4월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by