numpy remove columns containing nan

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

showing results for - "numpy remove columns containing nan"
Finn
02 May 2017
1a = a[~(np.isnan(a).any(axis=0))] # removes columns containing at least one nan
2a = a[~(np.isnan(a).all(axis=0))] # removes columns containing all nan
3
4