how to keep a dataset with only rows without nan python code example
Example: pandas where retuning NaN
# Try using a loc instead of a where:
df_sub = df.loc[df.yourcolumn == 'yourvalue']
# Try using a loc instead of a where:
df_sub = df.loc[df.yourcolumn == 'yourvalue']