how do i extract columns with specific row names from .csv file

3 views (last 30 days)
clc
clear all
file = fullfile('C:\Users\barath\Downloads\full_data.csv')
files = readtable(file)
in = files.location('India',:)
%error i get is: Error using tabular/dotParenReference (line 95)Unrecognized row name 'India'.%

Accepted Answer

Mehmed Saad
Mehmed Saad on 9 Apr 2020
ind =strcmp(files.location,'India');
files(ind,:)

More Answers (0)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

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

Start Hunting!