Skip to content

Glossary: pandas Basics

to_numeric

Also written: pd.to_numeric, errors="coerce", coerce

Converts messy text to numbers. With `errors="coerce"`, anything that isn't a number becomes NaN instead of causing an error.

Where the book teaches it

Related terms

astypeNaN, NaT