I have this DataFrame and want only the records whose EPS column is not NaN:
DataFrame
EPS
NaN
>>> df STK_ID
Simplest of all solutions:
filtered_df = df[df['EPS'].notnull()]
The above solution is way better than using np.isfinite()