필터 지우기
필터 지우기

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 CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by