there is nan in a column, delete the whole row

1 次查看(过去 30 天)
I have a data base called data_crsp, and there might be some nan values in c.lagpe column (column 18), I want the whole row of data to be romoved if there is nan in column 18.
Thanks in advance!
  2 个评论



Chunru 2022-8-5
idx = isnan(c.lagpe); % find the index of nan
c(idx, :) =[]; % remove the rows from table

更多回答(0 个)


Community Treasure Hunt

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

Start Hunting!

Translated by