-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Level parameter of DataFrame.groupby should allow Sequences #836
Labels
Comments
Yes, a PR is welcome, along with tests. Would need to change the type of A test like you have above should suffice, i.e., you don't need to check all the overloads, although it would be good to have a test for both |
jens-diewald
added a commit
to jens-diewald/pandas-stubs
that referenced
this issue
Dec 22, 2023
jens-diewald
added a commit
to jens-diewald/pandas-stubs
that referenced
this issue
Dec 22, 2023
Dr-Irv
pushed a commit
that referenced
this issue
Dec 23, 2023
* Add test cases for level sequences This test fail currently, as the level parameter currently does not accept any sequences. * Allow sequences for groupby level parameter This fixes #836 * Add assert_type * Remove unnecessary quotes
twoertwein
pushed a commit
to twoertwein/pandas-stubs
that referenced
this issue
Dec 24, 2023
* Add test cases for level sequences This test fail currently, as the level parameter currently does not accept any sequences. * Allow sequences for groupby level parameter This fixes pandas-dev#836 * Add assert_type * Remove unnecessary quotes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The level parameter of DataFrame.groupby does not except sequences, when it should. (Corresponding Doc)
This is the same as pandas-dev/pandas#47548
To Reproduce
From the linked Issue above
My System
pandas-stubs
2.1.4.231218Potential Fix
The issue linked above was fixed by changing the type of
level
fromLevel | None
toIndexLabel | None
. (pandas-dev/pandas#47560)I suppose, the same Fix should be applied to the groupby-Overloads in pandas-stubs/core/frame.pyi.
I am happy to create a pull request, if that helps.
But i would appreciate it, if someone more involved with this library could confirm that the proposed fix makes sense.
The text was updated successfully, but these errors were encountered: