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