I have this DataFrame and want only the records whose EPS column is not NaN:
DataFrame
EPS
NaN
>>> df STK_ID
yet another solution which uses the fact that np.nan != np.nan:
np.nan != np.nan
In [149]: df.query("EPS == EPS") Out[149]: STK_ID EPS cash STK_ID RPT_Date 600016 20111231 600016 4.3 NaN 601939 20111231 601939 2.5 NaN