Coming to Python Pandas from NumPy? You'll reach for np.isnan: Unfortunately, this works. Better, use s.isna (or s.isnull). But the best way to drop NaN? Use dropna:
Seventy free hands-on workshops, from writing decorators with just the standard library through wrapt to testing and tracing with wrapture. Nothing to install.