numpy remove rows containing nan

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

showing results for - "numpy remove rows containing nan"
Elena
19 Oct 2017
1a = a[~(np.isnan(a).any(axis=1))] # removes rows containing at least one nan
2a = a[~(np.isnan(a).all(axis=1))] # removes rows containing all nan
3