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: Improvements to groupby.rst #51626

Merged
merged 4 commits into from
Feb 26, 2023
Merged

Conversation

rhshadrach
Copy link
Member

@rhshadrach rhshadrach commented Feb 25, 2023

Doing a general cleanup of the groupby user guide. The main new thing being introduce here is language to steer users way from groupby.apply.

@rhshadrach rhshadrach added Docs Groupby Nuisance Columns Identifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.apply labels Feb 25, 2023
@rhshadrach rhshadrach added this to the 2.0 milestone Feb 25, 2023

``apply`` has to try to infer from the result whether it should act as a reducer,
transformer, *or* filter, depending on exactly what is passed to it. Thus the
grouped column(s) may be included in the output as well as set the indices. While
Copy link
Member

Choose a reason for hiding this comment

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

may be included in the output as well as set as the indices

This sounds better to me, but best to double check, otherwise lgtm

Copy link
Member Author

Choose a reason for hiding this comment

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

Indeed - thanks. I also changed it from "as well as" to "or" since we don't do both.

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually - looking at this again I think we want to say "may be included in the output or not"

@phofl phofl merged commit 0dd3901 into pandas-dev:main Feb 26, 2023
@phofl
Copy link
Member

phofl commented Feb 26, 2023

thx @rhshadrach

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Feb 26, 2023
rhshadrach added a commit that referenced this pull request Feb 26, 2023
…#51642)

Backport PR #51626: DOC: Improvements to groupby.rst

Co-authored-by: Richard Shadrach <45562402+rhshadrach@users.noreply.github.com>
@rhshadrach rhshadrach deleted the groupby_userguide_1 branch March 2, 2023 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Groupby Nuisance Columns Identifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.apply
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: groupby Automatic exclusion of “nuisance” columns
2 participants