Skip to content

Commit d02eace

Browse files
committed
remove special casing in _wrap_aggregated_output
1 parent 433318a commit d02eace

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

pandas/core/groupby/generic.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -1647,10 +1647,7 @@ def _wrap_aggregated_output(
16471647
indexed_output = {key.position: val for key, val in output.items()}
16481648

16491649
agg_axis = self._obj_with_exclusions._get_axis(1 - self.axis)
1650-
if isinstance(agg_axis, MultiIndex):
1651-
columns = Index([key.label for key in output], names=agg_axis.names)
1652-
else:
1653-
columns = Index([key.label for key in output], name=agg_axis.name)
1650+
columns = Index([key.label for key in output], names=agg_axis.names)
16541651

16551652
result = self.obj._constructor(indexed_output)
16561653
result.columns = columns

0 commit comments

Comments
 (0)