Skip to content
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

BUG: incorrect casting in DataFrame.append #39454

Merged
merged 4 commits into from
Feb 1, 2021

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • Ensure all linting tests pass, see here for how to run them
  • whatsnew entry

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.

upcast_classes = _get_upcast_classes(join_units, dtypes)

if is_extension_array_dtype(dtype_alt):
Copy link
Contributor

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)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isnt't this heavily overlapping with: #39453 e.g. i like #39453 as it gets what we want ultimately rigth?

Copy link
Member Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok that's fine.

@jreback jreback added the Dtype Conversions Unexpected or buggy dtype conversions label Feb 1, 2021
@jreback jreback added this to the 1.3 milestone Feb 1, 2021
@jreback jreback merged commit 082023e into pandas-dev:master Feb 1, 2021
@jbrockmendel jbrockmendel deleted the bug-concat branch February 1, 2021 23:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants