How to skip last n rows while reading a csv file using readtable?
12 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Rahul Bhadani
am 16 Feb. 2021
Kommentiert: Walter Roberson
am 22 Nov. 2022
I have a csv file that I want to read as table in MATLAB using readtable command. However, I know that last few lines are corrupted or not reliable and I want to skip them. How can I do that using readtable. Note that a similar function is available in python's panda package for read.csv by supplying skipfooter.
0 Kommentare
Akzeptierte Antwort
Rahul Bhadani
am 16 Feb. 2021
1 Kommentar
Venkatkumar M
am 22 Nov. 2022
How to skip first 20 rows in the csv file?
Could you please give some answer?
Weitere Antworten (1)
KALYAN ACHARJYA
am 16 Feb. 2021
Bearbeitet: KALYAN ACHARJYA
am 16 Feb. 2021
This way?
data_table=readtable('filename');
%want to remove n rows from last
n=;...?
data=data_table(1:end-n,:)
4 Kommentare
Venkatkumar M
am 22 Nov. 2022
How to skip first 20 rows in the csv file?
Could you please give some answer?
Walter Roberson
am 22 Nov. 2022
data_table = readtable('filenameGoesHere', 'HeaderLines', 20);
Siehe auch
Kategorien
Mehr zu Data Type Identification finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!