Dropping null values by isfinite
df = df[np.isfinite(df['EPS'])] df=df[pd.isnull(df['EPS'])] df=df[pd.notnull(df['EPS'])]