-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
DOC: 62437 Replace @Substitution and @Appender in core/groupby/groupby.py #63234
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
base: main
Are you sure you want to change the base?
Conversation
rhshadrach
left a comment
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.
Looking good!
| >>> df | ||
| A B | ||
| A B | ||
| 0 a 1 | ||
| 1 b 2 | ||
| 2 a 3 |
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.
This change is wrong, the columns should be adjusted. Is pre-commit doing this with the ruff formater?
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.
Fixed! I think this is a holdover from the contents of the generated docstring I printed to console.
pandas/core/groupby/groupby.py
Outdated
| >>> df.groupby('A').pipe(lambda x: x.max() - x.min()) | ||
| B | ||
| >>> df.groupby("A").pipe(lambda x: x.max() - x.min()) | ||
| B |
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.
Ditto.
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.
I misunderstood the example. Fixed alignment of A B to match columns
Thank you for the feedback!
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.
I tried to combine lines 810/811 (i.e. A B) but that was causing Code Checks/Docstrings to fail. I reverted to the two lines and it's passing now, but doesn't look right in the file. I've not been able to find other examples that follow a pattern like that to see what others have done
I had issues updating my original PR (#63201), I redid it to account for formatting fixes. File: pandas/core/groupby/groupby.py
@Appender,@Substitution,@docwith inlined docstrings #62437 (Replace xxxx with the GitHub issue number)doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.AGENTS.md.