-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: incorrect casting in DataFrame.append #39454
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
upcast_classes = _get_upcast_classes(join_units, dtypes) | ||
|
||
if is_extension_array_dtype(dtype_alt): |
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.
can we just drop the upcast_classes stuff and just do an if/elseif here on dtype_alt? (as you have done with extension / object)
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.
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.
i think we're going to get there eventually, but there are a handful of tests that break if we do that right away. i think the behavior in those tests can be considered buggy (xref #39122), but want to address them in bite-size pieces
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.
ok that's fine.
I'm pretty sure we're going to end up with just using find_common_type instead of re-implementing similar stuff in internals.concat.