Skip to content

Commit 18de335

Browse files
author
GrimmXoXo
committed
Updated infer_dtype docstring
1 parent bc24e84 commit 18de335

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pandas/_libs/lib.pyx

+4-3
Original file line numberDiff line numberDiff line change
@@ -1518,7 +1518,7 @@ cdef object _try_infer_map(object dtype):
15181518

15191519
def infer_dtype(value: object, skipna: bool = True) -> str:
15201520
"""
1521-
Return a string label of the type of a scalar or list-like of values.
1521+
Return a string label of the type of the elements in a list-like input.
15221522

15231523
This method inspects the elements of the provided input and determines
15241524
classification of its data type. It is particularly useful for
@@ -1527,8 +1527,8 @@ def infer_dtype(value: object, skipna: bool = True) -> str:
15271527

15281528
Parameters
15291529
----------
1530-
value : scalar, list, ndarray, or pandas type
1531-
The input data to infer the dtype.
1530+
value : list, ndarray, or pandas type
1531+
The input data to infer the dtype.
15321532
skipna : bool, default True
15331533
Ignore NaN values when inferring the type.
15341534

@@ -1573,6 +1573,7 @@ def infer_dtype(value: object, skipna: bool = True) -> str:
15731573

15741574
Notes
15751575
-----
1576+
- The value parameter must be an iterable; scalar inputs are not supported.
15761577
- 'mixed' is the catchall for anything that is not otherwise
15771578
specialized
15781579
- 'mixed-integer-float' are floats and integers

0 commit comments

Comments
 (0)