plot including NaN values pandas code example
Example 1: pandas replace nan
data["Gender"].fillna("No Gender", inplace = True)
Example 2: pandas where retuning NaN
# Try using a loc instead of a where:
df_sub = df.loc[df.yourcolumn == 'yourvalue']