# remove all rows without a value in the 'name' column
df = df[df['name'].notna()]
# making new data frame with dropped NA values
new_data = df.dropna(axis = 0, how ='any')
df.dropna() #drop all rows that have any NaN values
df.dropna(how='all')
df = df.dropna(subset=['colA', 'colC'])
df = df.dropna(axis = 1)
df = df[pd.notnull(df['RespondentID'])]
# Drop the missing value present in the "RespondentID" column
df = df.dropna(how = 'all')
df = df.dropna()
# Drop rows which contain any NaN value in the selected columns
mod_df = df.dropna( how='any',
subset=['Name', 'Age'])
In [215]:
df[df['entrytype'].apply(lambda x: str(x).isdigit())]
Out[215]:
entrytype
0 0
1 1
4 2