-
Notifications
You must be signed in to change notification settings - Fork 110
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
[SNOW-1478924]: Ensure __getitem__
on DataFrameGroupBy returns SeriesGroupBy when appropriate even if as_index=False
#2475
Conversation
…esGroupBy when appropriate even if `as_index=False`
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 we add tests for this?
I think there are already tests for this? Because in a lot of the groupby tests, we have a getitem test, so that checks that this works correctly. Would you like me to add some tests that check the types of SeriesGroupBy vs. DataFrameGroupBy? |
Yeah in general I think it would be helpful to have an associated test (an isinstance check sounds good to me) whenever there is a bug fix |
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.
LGTM!
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.
LGTM!
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.
Nice! Thanks, Rehan.
Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
Fixes SNOW-1478924
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
Ensure that getitem on a DataFrameGroupBy returns a SeriesGroupBy if only one column is indexed, even if
as_index=False
.