Skip to content

Commit 38daa37

Browse files
committed
use _get_names() in column Index constructor
1 parent e2c26e5 commit 38daa37

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/groupby/generic.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1646,7 +1646,7 @@ def _wrap_aggregated_output(
16461646
"""
16471647
indexed_output = {key.position: val for key, val in output.items()}
16481648
agg_axis = self._obj_with_exclusions._get_axis(1 - self.axis)
1649-
columns = Index([key.label for key in output], name=agg_axis.names)
1649+
columns = Index([key.label for key in output], name=agg_axis._get_names())
16501650

16511651
result = self.obj._constructor(indexed_output)
16521652
result.columns = columns

0 commit comments

Comments
 (0)