dropna numpy code example
Example 1: how to delete nan values in python
x = x[~numpy.isnan(x)]
Example 2: remove nans and infs python
x = x[numpy.logical_not(numpy.isnan(x))]
Example 3: dropna pandas
>>> df.dropna(axis='columns')
name
0 Alfred
1 Batman
2 Catwoman