フィルターのクリア

there is nan in a column, delete the whole row

1 回表示 (過去 30 日間)
King To Leung
King To Leung 2022 年 8 月 5 日
コメント済み: Walter Roberson 2022 年 8 月 5 日
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 件のコメント
the cyclist
the cyclist 2022 年 8 月 5 日
I'm confused, because you refer to a "data base" data_crsp, but that's not a MATLAB object type.Then you refer to c.lagpe, but it's not clear what c is.
Walter Roberson
Walter Roberson 2022 年 8 月 5 日

サインインしてコメントする。

採用された回答

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeNumeric Types についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by