read spreadsheet, delete some variables, and save the spreadsheet

조회 수: 2 (최근 30일)
alpedhuez
alpedhuez 2020년 6월 11일
댓글: alpedhuez 2020년 6월 11일
I have a spreadsheet 'test.csv' with the columns
date temperature number_of_deadlines
I read this spreadsheet with readtable, then I want to delete the column of 'number_of_deadlines" and then save the spreadsheet 'test2.csv' with
date temperature
Please advise.

채택된 답변

Ameer Hamza
Ameer Hamza 2020년 6월 11일
편집: Ameer Hamza 2020년 6월 11일
Something like this
t = readtable('test.csv');
t.number_of_deadlines = [];
writetable(t, 'test2.csv')

추가 답변 (1개)

madhan ravi
madhan ravi 2020년 6월 11일
T = readtable('test.csv');
writetable(T(:,1:2), 'test2.csv')

카테고리

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

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by