Skip to content

Commit f72f65e

Browse files
suggested edits
1 parent 6f9e382 commit f72f65e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

pandas/core/reshape/tile.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Timestamp,
1414
)
1515
from pandas._libs.lib import infer_dtype
16+
from pandas._typing import AnyArrayLike
1617

1718
from pandas.core.dtypes.common import (
1819
DT64NS_DTYPE,
@@ -44,7 +45,7 @@
4445

4546

4647
def cut(
47-
x,
48+
x: AnyArrayLike,
4849
bins,
4950
right: bool = True,
5051
labels=None,
@@ -383,8 +384,8 @@ def qcut(
383384

384385

385386
def _bins_to_cuts(
386-
x,
387-
bins,
387+
x: AnyArrayLike,
388+
bins: np.ndarray,
388389
right: bool = True,
389390
labels=None,
390391
precision: int = 3,
@@ -393,6 +394,9 @@ def _bins_to_cuts(
393394
duplicates: str = "raise",
394395
ordered: bool = True,
395396
):
397+
"""
398+
Allots `bins` to each item in `x`
399+
"""
396400
if not ordered and labels is None:
397401
raise ValueError("'labels' must be provided if 'ordered = False'")
398402

0 commit comments

Comments
 (0)