pandas series apply to all values that are non nan code example
Example 1: represent NaN with pandas in python
import pandas as pd
if pd.isnull(float("Nan")):
print("Null Value.")
Example 2: pandas where retuning NaN
# Try using a loc instead of a where:
df_sub = df.loc[df.yourcolumn == 'yourvalue']