Data Science Asked on June 10, 2021
I am working with data from the government regarding COVID immunization numbers and would like to convert object columns into numeric. I am using Python in Jupyter Notebook. I tried using to_numeric
, but the dtype is still an object. Any suggestions?
Thanks in advance 🙂
Set the errors parameter of the to_numeric function to 'coerce'. The value 'ignore' will leave any invalid value as is while 'coerce' will set it to NaN.
Answered by Coconut on June 10, 2021
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP