Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pandas replace non numeric values with 0?

training_data['usagequantity'] = (
    pd.to_numeric(training_data['usagequantity'],
                  errors='coerce')
      .fillna(0)
    )
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pandas #replace #numeric #values
ADD COMMENT
Topic
Name
2+6 =