From ab3fc9ee2c46ed3ebb4c6e2cd338fb4feb51aa8b Mon Sep 17 00:00:00 2001 From: Phillip Cloud <417981+cpcloud@users.noreply.github.com> Date: Wed, 30 Aug 2023 11:09:19 -0400 Subject: [PATCH] fix(pandas): compatibility with 2.1 groupby behavior --- ibis/backends/pandas/execution/generic.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ibis/backends/pandas/execution/generic.py b/ibis/backends/pandas/execution/generic.py index 58a47198d6d7..0a64f60e0f51 100644 --- a/ibis/backends/pandas/execution/generic.py +++ b/ibis/backends/pandas/execution/generic.py @@ -588,7 +588,10 @@ def execute_aggregation_dataframe( ) for key in op.by ] - source = data.groupby(grouping_keys, group_keys=False) + source = data.groupby( + grouping_keys[0] if len(grouping_keys) == 1 else grouping_keys, + group_keys=False, + ) else: source = data