Command
df.dropnaExplanation
df.dropna() removes rows or columns containing NaN values.
Examples
Drop rows with missing values
df.dropna()Drop columns with missing values
df.dropna(axis=1)df.dropnadf.dropna() removes rows or columns containing NaN values.
Drop rows with missing values
df.dropna()Drop columns with missing values
df.dropna(axis=1)