pandas select rows with no nans code example
Example 1: count nan pandas
#Python, pandas
#Count missing values for each column of the dataframe df
df.isnull().sum()
Example 2: drop if nan in column pandas
df = df[df['EPS'].notna()]
#Python, pandas
#Count missing values for each column of the dataframe df
df.isnull().sum()
df = df[df['EPS'].notna()]