-
-
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
ENH: Add indexing syntax to GroupBy.nth() #44688
Conversation
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 like it. some small commments.
pandas/core/groupby/groupby.py
Outdated
@@ -902,6 +905,15 @@ def __getattr__(self, attr: str): | |||
f"'{type(self).__name__}' object has no attribute '{attr}'" | |||
) | |||
|
|||
def __getattribute__(self, attr): |
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.
can you type args & outputs
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.
Typed the arg, but the output has no type
Hello @johnzangwill! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2021-12-04 16:01:30 UTC |
thanks @johnzangwill very nice |
Hi. Is this already implemented into pandas? I have a use case with groupby slice which is similar to this. Thank you! |
@emilmirzayev This has been merged to master for release in 1.4, which was scheduled for December 31 2021. |
Add index notation to nth for lists of integers and slices