read spreadsheet, delete some variables, and save the spreadsheet

4 vues (au cours des 30 derniers jours)
alpedhuez
alpedhuez le 11 Juin 2020
Commenté : alpedhuez le 11 Juin 2020
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.

Réponse acceptée

Ameer Hamza
Ameer Hamza le 11 Juin 2020
Modifié(e) : Ameer Hamza le 11 Juin 2020
Something like this
t = readtable('test.csv');
t.number_of_deadlines = [];
writetable(t, 'test2.csv')

Plus de réponses (1)

madhan ravi
madhan ravi le 11 Juin 2020
T = readtable('test.csv');
writetable(T(:,1:2), 'test2.csv')

Tags

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by