Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas replace non numeric values with 0?

df.col =pd.to_numeric(df.col, errors ='coerce').fillna(0).astype('int')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #replace #numeric #values
ADD COMMENT
Topic
Name
2+7 =