You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Indicate which type checker you are using (mypy or pyright).
I am using mypy (1.10.0)
Show the error message received from that type checker while checking your example.
ex.py:3: error: Unexpected keyword argument "future_stack" for "stack" of "DataFrame" [call-arg]
ex.py:4: error: Unexpected keyword argument "sort" for "stack" of "DataFrame" [call-arg]
Found 2 errors in 1 file (checked 1 source file)
Please complete the following information:
OS: ArchLinux
python version: 3.10.14
version of type checker: 1.10.0
version of installed pandas-stubs 2.2.2.240514
Additional context
I'll be glad to open a PR to add those two arguments with some tests if that's ok for you, but I'm not entirely sure about what is the philosophy about pandas-stubs here. Since they are new arguments in 2.1, could it be bad to add those arguments in pandas stubs for someone who sill uses 2.0?
The text was updated successfully, but these errors were encountered:
I'll be glad to open a PR to add those two arguments with some tests if that's ok for you, but I'm not entirely sure about what is the philosophy about pandas-stubs here. Since they are new arguments in 2.1, could it be bad to add those arguments in pandas stubs for someone who sill uses 2.0?
Not a problem, because we only support the latest version of pandas in the stubs. Also, the arguments are optional, so anyone using an earlier version of pandas wouldn't be using them anyway.
Thanks for the report. Given that future_stack is incompatible with sort and dropna, you'd need overloads to show the possible combinations of the arguments.
Describe the bug
Method
.stack
of dataframe is not fully typed, it misses argumentsort
andfuture_stack
To Reproduce
pandas
example that is not properly checked by the stubs.mypy
orpyright
).I am using mypy (1.10.0)
Please complete the following information:
pandas-stubs
2.2.2.240514Additional context
I'll be glad to open a PR to add those two arguments with some tests if that's ok for you, but I'm not entirely sure about what is the philosophy about pandas-stubs here. Since they are new arguments in 2.1, could it be bad to add those arguments in pandas stubs for someone who sill uses 2.0?
The text was updated successfully, but these errors were encountered: