Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to replace nan with 0 in pandas

df['product']=df['product'].fillna(0)
df['context']=df['context'].fillna(0)
df
 
PREVIOUS NEXT
Tagged: #replace #nan #pandas
ADD COMMENT
Topic
Name
5+6 =