python return rows with nan code example
Example 1: dataframe find nan rows
df[df.isnull().any(axis=1)]
Example 2: pandas where retuning NaN
# Try using a loc instead of a where:
df_sub = df.loc[df.yourcolumn == 'yourvalue']
df[df.isnull().any(axis=1)]
# Try using a loc instead of a where:
df_sub = df.loc[df.yourcolumn == 'yourvalue']