diff --git a/pandas/core/groupby/groupby.py b/pandas/core/groupby/groupby.py index 7fe9d7cb49eb5..36c7f53d23098 100644 --- a/pandas/core/groupby/groupby.py +++ b/pandas/core/groupby/groupby.py @@ -1817,9 +1817,7 @@ def describe(self, **kwargs): result = self.apply(lambda x: x.describe(**kwargs)) if self.axis == 1: return result.T - # FIXME: not being consolidated breaks - # test_describe_with_duplicate_output_column_names - return result._consolidate().unstack() + return result.unstack() @final def resample(self, rule, *args, **kwargs): diff --git a/pandas/tests/groupby/test_function.py b/pandas/tests/groupby/test_function.py index 40f8135637292..163303168c240 100644 --- a/pandas/tests/groupby/test_function.py +++ b/pandas/tests/groupby/test_function.py @@ -1077,6 +1077,7 @@ def test_describe_with_duplicate_output_column_names(as_index): "c": [10, 20, 30, 40, 50, 60], }, columns=["a", "b", "b"], + copy=False, ) expected = (