remove Nan excel python code example
Example 1: how to remove rows with nan in pandas
df.dropna(subset=[columns],inplace=True)
Example 2: python remove nan rows
df = df[df['my_var'].notna()]
df.dropna(subset=[columns],inplace=True)
df = df[df['my_var'].notna()]