File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1313 Timestamp ,
1414)
1515from pandas ._libs .lib import infer_dtype
16+ from pandas ._typing import AnyArrayLike
1617
1718from pandas .core .dtypes .common import (
1819 DT64NS_DTYPE ,
4445
4546
4647def cut (
47- x ,
48+ x : AnyArrayLike ,
4849 bins ,
4950 right : bool = True ,
5051 labels = None ,
@@ -383,8 +384,8 @@ def qcut(
383384
384385
385386def _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
You can’t perform that action at this time.
0 commit comments