-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: followup to #20583, observed kwarg for .groupby #20941
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20941 +/- ##
=======================================
Coverage 91.81% 91.81%
=======================================
Files 153 153
Lines 49479 49479
=======================================
Hits 45428 45428
Misses 4051 4051
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small typos.
pandas/core/generic.py
Outdated
if None: if any categorical groupers, show a FutureWarning, | ||
default to False. | ||
observed : boolean, default False | ||
This only applies if any if the groupers are Categoricals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if any if the groupers
-> if any of the groupers
pandas/core/groupby/groupby.py
Outdated
if self.observed: | ||
return result | ||
|
||
# we need to re-expand the output space to accomadate all values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accomodate
pandas/core/groupby/groupby.py
Outdated
return result | ||
|
||
# we need to re-expand the output space to accomadate all values | ||
# whethere observed or not in the cartesian product of our groupes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whether
pandas/core/groupby/groupby.py
Outdated
elif self.observed: | ||
return result | ||
|
||
# reindexing only appiles to a Categorical grouper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applies
closes #20902