Skip to content

Commit af5ff18

Browse files
committed
Doc: Clarify to_numeric behavior for numeric dtypes
1 parent 6a6a1ba commit af5ff18

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pandas/core/tools/numeric.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,11 @@ def to_numeric(
5555
"""
5656
Convert argument to a numeric type.
5757
58-
The default return dtype is `float64` or `int64`
58+
If the input is already of a numeric dtype, the dtype will be preserved.
59+
For non-numeric inputs, the default return dtype is `float64` or `int64`
5960
depending on the data supplied. Use the `downcast` parameter
60-
to obtain other dtypes.
61+
to obtain other dtypes. Numeric dtypes include all dtypes that have
62+
the `_is_numeric` attribute set to `True`.
6163
6264
Please note that precision loss may occur if really large numbers
6365
are passed in. Due to the internal limitations of `ndarray`, if

0 commit comments

Comments
 (0)