pandas appliy ignore nan code example
Example: how to replace nan with 0 in pandas
df['product']=df['product'].fillna(0)
df['context']=df['context'].fillna(0)
df
df['product']=df['product'].fillna(0)
df['context']=df['context'].fillna(0)
df