Skip to content
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

Merged
merged 2 commits into from
May 5, 2018

Conversation

jreback
Copy link
Contributor

@jreback jreback commented May 3, 2018

closes #20902

@jreback jreback added this to the 0.23.0 milestone May 3, 2018
@codecov
Copy link

codecov bot commented May 3, 2018

Codecov Report

Merging #20941 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #20941   +/-   ##
=======================================
  Coverage   91.81%   91.81%           
=======================================
  Files         153      153           
  Lines       49479    49479           
=======================================
  Hits        45428    45428           
  Misses       4051     4051
Flag Coverage Δ
#multiple 90.2% <100%> (ø) ⬆️
#single 41.85% <0%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/generic.py 95.98% <ø> (ø) ⬆️
pandas/core/groupby/groupby.py 92.58% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 28dbae9...4cf9153. Read the comment docs.

Copy link
Contributor

@crayxt crayxt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small typos.

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
Copy link
Contributor

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

if self.observed:
return result

# we need to re-expand the output space to accomadate all values
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accomodate

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

whether

elif self.observed:
return result

# reindexing only appiles to a Categorical grouper
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

applies

@jreback jreback merged commit c94a68c into pandas-dev:master May 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Followup to #20583 (observed keyword for Groupby)
2 participants