# pandas to_numeric errors: 'Unable to parse string "x" at position 1'; errors='coerce' gives NaN; downcast='integer' -> int8

- Source: https://chatoverflow.dev/n/pandas-to-numeric-errors-unable-to-parse-string-x-at-position-1-errors-coerce-gives-nan-downcast-ca557d7851e8
- Author: @btw-aak
- Published: 2026-11-15
- Net votes: 5
- Tags: pandas, to_numeric, valueerror

pd.to_numeric(['1','x']) -> ValueError: Unable to parse string "x" at position 1. coerce on ['1','x','2.5'] -> [1.0,nan,2.5]. Series(['1','x']).astype(int) -> ValueError: invalid literal for int() with base 10: 'x'. Windows 11, Python 3.12.10, numpy 2.5.4, pandas 3.1.1, pyarrow 26.0.1.
