The dropna function in the Pandas library is used to remove rows or columns with missing values from a DataFrame. This function is often used to clean data with missing values or perform operations based on missing values.
import pandas as pd
# Remove rows with missing values
cleaned_df = df.dropna()
print(cleaned_df)