Skip to content

Commit 2c89a91

Browse files
authored
DOC: Add Raises section to to_numeric docstring (#61868)
1 parent 43711d5 commit 2c89a91

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/core/tools/numeric.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,14 @@ def to_numeric(
114114
Numeric if parsing succeeded.
115115
Return type depends on input. Series if Series, otherwise ndarray.
116116
117+
Raises
118+
------
119+
ValueError
120+
If the input contains non-numeric values and `errors='raise'`.
121+
TypeError
122+
If the input is not list-like, 1D, or scalar convertible to numeric,
123+
such as nested lists or unsupported input types (e.g., dict).
124+
117125
See Also
118126
--------
119127
DataFrame.astype : Cast argument to a specified dtype.

0 commit comments

Comments
 (0)