xxxxxxxxxx
# Drop rows that contain missing data and update the DataFrame.
data = data.dropna(axis=0)
# Confirm the data contains no missing values.
data.isnull().sum(axis=0)
xxxxxxxxxx
df.dropna(axis=0, how='any', inplace=True)
xxxxxxxxxx
# making new data frame with dropped NA values
new_data = df.dropna(axis = 0, how ='any')
xxxxxxxxxx
# Drop rows which contain any NaN value in the selected columns
mod_df = df.dropna( how='any',
subset=['Name', 'Age'])
xxxxxxxxxx
df = df[pd.notnull(df['RespondentID'])]
# Drop the missing value present in the "RespondentID" column