Skip to content

Commit 64e9176

Browse files
committed
BUG: GroupBy.quantile error with integer columns and arraylike q (GH30289)
1 parent 665032b commit 64e9176

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/groupby/groupby.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1938,7 +1938,9 @@ def post_processor(vals: np.ndarray, inference: Optional[Type]) -> np.ndarray:
19381938
# but this hits https://github.com/pandas-dev/pandas/issues/10710
19391939
# which doesn't reorder the list-like `q` on the inner level.
19401940
order = np.roll(list(range(result.index.nlevels)), -1)
1941-
result = result.reorder_levels(order)
1941+
result = result.reorder_levels(
1942+
order, positional=True
1943+
) # GH30289: reorder based on position, not labels
19421944
result = result.reindex(q, level=-1)
19431945

19441946
# fix order.

0 commit comments

Comments
 (0)