-
-
Notifications
You must be signed in to change notification settings - Fork 141
Wrong typing for the values
argument of the pandas.DataFrame.pivot_table
method
#885
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
Comments
Thanks for the report. As you pointed out, it's a simple fix to add a PR with test welcome |
Hi @Dr-Irv , I noticed that this issue is currently unassigned, and I'm interested in working on it. Could you please assign it to me? I believe I can contribute to fix the problem (as per you mentioned). Thanks. |
Assigned to you. Be sure to update the stub and include a test |
It seems there is already a test exists regarding this issue #885
Should I include another one of the same kind? |
Possibly, but the check you included tests |
* #885 Added Sequence[_str] to the values argument in the stub * Added the test case test_types_pivot_table() for the changed TYP of values argument in pivot_table * Changed the argument values for the test case test_types_pivot_table * Fixed formatting with black
Describe the bug
The
values
argument of thepandas.DataFrame.pivot_table
method has type ofstr | None
:pandas-stubs/pandas-stubs/core/frame.pyi
Lines 1126 to 1137 in 7dd7b6a
But the Pandas documentation says that
values
may have not only a string value, but also a list-like value:Docs of
pandas.DataFrame.pivot_table
To Reproduce
pandas
example that is not properly checked by the stubs:mypy
.mypy
:Please complete the following information:
python
version: 3.10.11mypy
version: 1.8.0pandas-stubs
version: 2.2.0.240218The text was updated successfully, but these errors were encountered: