필터 지우기
필터 지우기

How to read excel files in chunk?

조회 수: 3 (최근 30일)
Atik Faysal
Atik Faysal 2021년 2월 2일
댓글: dpb 2021년 2월 2일
I do not want to load the whole excel file in the environment to save memory. I know in can be done with pandas in python. Any way to implement the same thing in matlab?
  댓글 수: 2
Ive J
Ive J 2021년 2월 2일
편집: Ive J 2021년 2월 2일
See datastore or similar.
ds = tabularTextDatastore(myBigdata, 'ReadSize', 100); % set desired line num
while hasdata(ds)
chunk = read(ds); % reads only 100 rows of original file
% do something
end
dpb
dpb 2021년 2월 2일
tabularTextDatastore is not available for a spreadsheet; a spreadsheetDatastore is required. Could then partition it into n smaller pieces.
Or, one can simply use the 'Range' row numbers wanted with readtable or readmatrix if is numeric data; readcell it otherwise.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by