dataframe where row not nan code example Example 1: dataframe find nan rows df[df.isnull().any(axis=1)] Example 2: pandas if nan, then the row above df.fillna(method='ffill')