get rows with nan pandas code example
Example 1: dataframe find nan rows
df[df.isnull().any(axis=1)]
Example 2: find nan values in a column pandas
df.isnull().values.any()
Example 3: find nan value in dataframe python
# to mark NaN column as True
df['your column name'].isnull()
Example 4: show all rows with nan for a column value pandas
df[df['col'].isnull()]
Example 5: select rows with nan pandas
df[df['Col2'].isnull()]
Example 6: pandas if nan, then the row above
df.fillna(method='ffill')