Skip to content

Commit 90481c2

Browse files
committed
Add right argument to pandas.qcut to support left-inclusive binning #62938
1 parent f4851e5 commit 90481c2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/reshape/tile.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ def qcut(
294294
x,
295295
q,
296296
labels=None,
297+
right: bool = True,
297298
retbins: bool = False,
298299
precision: int = 3,
299300
duplicates: str = "raise",
@@ -378,6 +379,7 @@ def qcut(
378379
x_idx,
379380
Index(bins),
380381
labels=labels,
382+
right=right,
381383
precision=precision,
382384
include_lowest=True,
383385
duplicates=duplicates,

0 commit comments

Comments
 (0)