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 13
13
Timestamp ,
14
14
)
15
15
from pandas ._libs .lib import infer_dtype
16
+ from pandas ._typing import AnyArrayLike
16
17
17
18
from pandas .core .dtypes .common import (
18
19
DT64NS_DTYPE ,
44
45
45
46
46
47
def cut (
47
- x ,
48
+ x : AnyArrayLike ,
48
49
bins ,
49
50
right : bool = True ,
50
51
labels = None ,
@@ -383,8 +384,8 @@ def qcut(
383
384
384
385
385
386
def _bins_to_cuts (
386
- x ,
387
- bins ,
387
+ x : AnyArrayLike ,
388
+ bins : np . ndarray ,
388
389
right : bool = True ,
389
390
labels = None ,
390
391
precision : int = 3 ,
@@ -393,6 +394,9 @@ def _bins_to_cuts(
393
394
duplicates : str = "raise" ,
394
395
ordered : bool = True ,
395
396
):
397
+ """
398
+ Allots `bins` to each item in `x`
399
+ """
396
400
if not ordered and labels is None :
397
401
raise ValueError ("'labels' must be provided if 'ordered = False'" )
398
402
You can’t perform that action at this time.
0 commit comments