remove nans and infs python

37

x = x[numpy.logical_not(numpy.isnan(x))]
df.replace([np.inf, -np.inf], np.nan).dropna(axis=1)

Comments

Submit
0 Comments