df drop na in index code example Example 1: drop null rows pandas df.dropna() Example 2: delete nans in df python df[~np.isnan(df)]