contains in pandas column skip nan values code example
Example 1: pandas where retuning NaN
# Try using a loc instead of a where:
df_sub = df.loc[df.yourcolumn == 'yourvalue']
Example 2: pandas nan values in column
df['your column name'].isnull()