x = x[~numpy.isnan(x)]
>>> df.dropna(axis='columns') name 0 Alfred 1 Batman 2 Catwoman
x = x[numpy.logical_not(numpy.isnan(x))]