フィルターのクリア

Removing NaNs from imported table

190 ビュー (過去 30 日間)
Ilay Green
Ilay Green 2023 年 1 月 14 日
コメント済み: Star Strider 2023 年 1 月 14 日
Hey everyone,
I am trying to remove all the NaNs from an imported table with readtable() (.xlsx file).
i've tried using isnan() but without success.
assuming all i have right now is:
R = readtable('blabla')
how can i remove the NaNs and keep the save the new table?
  • table looks like this:
thanks for the help!

採用された回答

Star Strider
Star Strider 2023 年 1 月 14 日
See if the rmmissing function (introduced in R2016b) will do what you want.
  4 件のコメント
Ilay Green
Ilay Green 2023 年 1 月 14 日
tyvm!
made me realize it is not neccesary to use a certain function when facing a problem!
Star Strider
Star Strider 2023 年 1 月 14 日
As always, my pleasure!

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

その他の回答 (1 件)

Jeff Beck
Jeff Beck 2023 年 1 月 14 日
編集済み: Jeff Beck 2023 年 1 月 14 日
You might try using the "MissingRule" option set to "omitrow" in readtable:
R = readtable('blabla', 'MissingRule', 'omitrow');
  1 件のコメント
Ilay Green
Ilay Green 2023 年 1 月 14 日
thanks for reply!
its not working though, Star Strider solution worked well for me

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

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by