Skip to content

Commit 152c1ed

Browse files
committed
DOC: Add Raises section to to_numeric docstring
1 parent 1d153bb commit 152c1ed

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/core/tools/numeric.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,13 @@ 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).
117124
See Also
118125
--------
119126
DataFrame.astype : Cast argument to a specified dtype.

0 commit comments

Comments
 (0)