Skip to content

Conversation

@angela-tarantula
Copy link
Contributor

This will fix the following class of precision loss:

>>> a = Series([1666880195890293744], dtype="Int64").to_frame()
>>> b = Series([1,2], dtype="Int64").to_frame()
>>> a
                     0
0  1666880195890293744
>>> b
   0
0  1
1  2
>>> a.combine_first(b)
                     0
0  1666880195890293760
1                    2

See my comment here for more information.

@angela-tarantula angela-tarantula changed the title Fix precision loss in DataFrame.combine_first BUG: Fix precision loss in DataFrame.combine_first Oct 24, 2025
@angela-tarantula angela-tarantula marked this pull request as ready for review October 24, 2025 02:36
Copy link
Member

@rhshadrach rhshadrach left a comment

Choose a reason for hiding this comment

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

lgtm, cc @mroeschke

@rhshadrach rhshadrach added Bug combine/combine_first/update NDFrame.combine, combine_first, update labels Oct 24, 2025
@rhshadrach rhshadrach added this to the 3.0 milestone Oct 24, 2025
@mroeschke mroeschke merged commit dd00e0f into pandas-dev:main Oct 24, 2025
49 of 52 checks passed
@mroeschke
Copy link
Member

Thanks @angela-tarantula

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug combine/combine_first/update NDFrame.combine, combine_first, update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants