Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy find rows containing nan

# in each case returns array of bool
np.isnan(a).any(axis=1) # rows where any value is nan
np.isnan(a).all(axis=1) # rows where all values are nan
Source by note.nkmk.me #
 
PREVIOUS NEXT
Tagged: #numpy #find #rows #nan
ADD COMMENT
Topic
Name
2+1 =