We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 881c7e1 commit a67f4d0Copy full SHA for a67f4d0
pandas/core/groupby/groupby.py
@@ -1485,10 +1485,11 @@ def ohlc(self):
1485
1486
@Appender(DataFrame.describe.__doc__)
1487
def describe(self, **kwargs):
1488
- result = self.apply(lambda x: x.describe(**kwargs))
1489
- if self.axis == 1:
1490
- return result.T
1491
- return result.unstack()
+ with _group_selection_context(self):
+ result = self.apply(lambda x: x.describe(**kwargs))
+ if self.axis == 1:
+ return result.T
1492
+ return result.unstack()
1493
1494
@Substitution(name='groupby')
1495
@Appender(_doc_template)
0 commit comments