pandas replace non numeric values with 0 3f

Solutions on MaxInterview for pandas replace non numeric values with 0 3f by the best coders in the world

showing results for - "pandas replace non numeric values with 0 3f"
Juan Manuel
19 Jan 2019
1training_data['usagequantity'] = (
2    pd.to_numeric(training_data['usagequantity'],
3                  errors='coerce')
4      .fillna(0)
5    )
6
Bart
26 May 2017
1df.col =pd.to_numeric(df.col, errors ='coerce').fillna(0).astype('int')
2