pandas remove rows where value is null code example
Example 1: drop null rows pandas
df.dropna()
Example 2: remove all rows without a value pandas
# Keeps only rows without a missing value
df = df[df['name'].notna()]
df.dropna()
# Keeps only rows without a missing value
df = df[df['name'].notna()]