-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
TYP: Signature of "reindex" incompatible with supertype "NDFrame" #40984
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
Conversation
MarcoGorelli
commented
Apr 16, 2021
- closes TYP: Signature of "reindex" incompatible with supertype "NDFrame" #40980
- tests added / passed
- Ensure all linting tests pass, see here for how to run them
- whatsnew entry
pandas/core/describe.py
Outdated
d = cast( | ||
DataFrame, | ||
concat( | ||
[x.reindex(col_names, copy=False) for x in ldesc], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x.reindex(col_names, copy=False)
was previously revealed to be of type Any
. Now that it's typed, the result of concat
is Frame | Series
, so the cast is necessary
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
presumably at some point we'll overload concat s.t. axis=1 returns DataFrame, at which point this cast will be unnecessary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, exactly!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
still working? |
Yes, ready for review |
thanks @MarcoGorelli |