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
When subclassing pandas DataFrame by subclassing _constructor, type hints indicate that any return from a loc, iloc, etc... indexing is a pandas DataFrame not the subclass. To Reproduce
Provide a minimal runnable pandas example that is not properly checked by the stubs.
We should probably return Self more often: after double checking that pandas actually returns the sub-class, for example, _consructor returns DataFrame unless a sub-class overwrites it.
Describe the bug
When subclassing pandas DataFrame by subclassing _constructor, type hints indicate that any return from a loc, iloc, etc... indexing is a pandas DataFrame not the subclass.
To Reproduce
pandas
example that is not properly checked by the stubs.mypy
orpyright
).I used
mypy
.pandas-stubs
: 2.1.4.231227The text was updated successfully, but these errors were encountered: