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
Describe the bug
When trying to concat a Series to a DataFrame, mypy complains, but I see in the stubs that it should be possible (see image below). Am I doing something wrong?
To Reproduce
Provide a minimal runnable pandas example that is not properly checked by the stubs.
Indicate which type checker you are using (mypy or pyright).
mypy
Show the error message received from that type checker while checking your example. error: List item 0 has incompatible type "Series[Any]"; expected "DataFrame" [list-item]
or error: List item 0 has incompatible type "Series[Any] | DataFrame"; expected "DataFrame" [list-item]
Please complete the following information:
OS: Windows
OS Version: 10
python version: 3.11
version of type checker: 1.8.0
version of installed pandas-stubs: 2.2.0.240218
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Not sure why Iterable[Series | DataFrame] doesn't work with a list of series and dataframes, but you are right, it works from main. Thanks. I'll wait for the release then.
Describe the bug
When trying to concat a Series to a DataFrame, mypy complains, but I see in the stubs that it should be possible (see image below). Am I doing something wrong?
To Reproduce
pandas
example that is not properly checked by the stubs.or
mypy
orpyright
).mypy
error: List item 0 has incompatible type "Series[Any]"; expected "DataFrame" [list-item]
or
error: List item 0 has incompatible type "Series[Any] | DataFrame"; expected "DataFrame" [list-item]
Please complete the following information:
pandas-stubs
: 2.2.0.240218Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: