apply function in pandas does not ignores nan while applying code example
Example 1: pandas filter non nan
filtered_df = df[df['name'].notnull()]
Example 2: pandas where retuning NaN
# Try using a loc instead of a where:
df_sub = df.loc[df.yourcolumn == 'yourvalue']