Skip to content

Commit 7b2b6fd

Browse files
author
GrimmXoXo
committed
DOC: Update infer_dtype docstring
1 parent 3c93d06 commit 7b2b6fd

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

pandas/_libs/lib.pyx

+3-2
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,7 +1527,7 @@ def infer_dtype(value: object, skipna: bool = True) -> str:
15271527

15281528
Parameters
15291529
----------
1530-
value : scalar, list, ndarray, or pandas type
1530+
value : list, ndarray, or pandas type
15311531
The input data to infer the dtype.
15321532
skipna : bool, default True
15331533
Ignore NaN values when inferring the type.
@@ -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

pandas/_libs/tslibs/offsets.pyx

+4-4
Original file line numberDiff line numberDiff line change
@@ -5108,8 +5108,8 @@ def _warn_about_deprecated_aliases(name: str, is_period: bool) -> str:
51085108
warnings.warn(
51095109
f"\'{name}\' is deprecated and will be removed "
51105110
f"in a future version, please use "
5111-
f"\'{c_PERIOD_AND_OFFSET_DEPR_FREQSTR.get(name)}\'"
5112-
f" instead.",
5111+
f"\'{c_PERIOD_AND_OFFSET_DEPR_FREQSTR.get(name)}\' "
5112+
f"instead.",
51135113
FutureWarning,
51145114
stacklevel=find_stack_level(),
51155115
)
@@ -5122,8 +5122,8 @@ def _warn_about_deprecated_aliases(name: str, is_period: bool) -> str:
51225122
warnings.warn(
51235123
f"\'{name}\' is deprecated and will be removed "
51245124
f"in a future version, please use "
5125-
f"\'{_name}\'"
5126-
f" instead.",
5125+
f"\'{_name}\' "
5126+
f"instead.",
51275127
FutureWarning,
51285128
stacklevel=find_stack_level(),
51295129
)

0 commit comments

Comments
 (0)