Skip to content

BUG: Creation of UInt64 column with 18446744073709551615 throws RuntimeWarning #60214

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

Closed
wants to merge 18 commits into from

Conversation

lfffkh
Copy link
Contributor

@lfffkh lfffkh commented Nov 6, 2024

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.

Thanks for the PR! Please always add tests when fixing bugs or changing behavior.

@rhshadrach rhshadrach added Bug Constructors Series/DataFrame/Index/pd.array Constructors labels Nov 6, 2024
@lfffkh lfffkh requested a review from rhshadrach November 9, 2024 09:23
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.

Can you add a test for DataFrame/Series construction as well.

data.soften_mask() # set hardmask False if it was True
data[mask] = fill_value
dtype = cast(np.dtype, data.dtype)
if isinstance(dtype, ExtensionDtype) and dtype.name.startswith("Masked"):
Copy link
Member

Choose a reason for hiding this comment

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

I haven't checked thoroughly, but I think you want dtype._can_hold_na instead of having logic depend on the name of the dtype.

),
],
)
def test_sanitize_masked_array_with_masked_ea(values, dtype, expected):
Copy link
Member

Choose a reason for hiding this comment

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

Can you add a case that tests for a large number as in an issue.

Also start the test with a reference to the GitHub issue:

# GH#60050

@mroeschke
Copy link
Member

Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.

@mroeschke mroeschke closed this Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Constructors Series/DataFrame/Index/pd.array Constructors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants