there is nan in a column, delete the whole row
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
King To Leung
el 5 de Ag. de 2022
Comentada: Walter Roberson
el 5 de Ag. de 2022
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 comentarios
the cyclist
el 5 de Ag. de 2022
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.
Respuesta aceptada
Chunru
el 5 de Ag. de 2022
idx = isnan(c.lagpe); % find the index of nan
c(idx, :) =[]; % remove the rows from table
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Numeric Types en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!