numpy find rows containing nan

Solutions on MaxInterview for numpy find rows containing nan by the best coders in the world

showing results for - "numpy find rows containing nan"
Gracie
10 Jan 2021
1# in each case returns array of bool
2np.isnan(a).any(axis=1) # rows where any value is nan
3np.isnan(a).all(axis=1) # rows where all values are nan