Skip to content

Conversation

@wisznie
Copy link

@wisznie wisznie commented Nov 4, 2025

Continuing on the work done in #61659

@wisznie wisznie changed the title Bugfix to numeric when pyarrow with na continuation BUG: to_numeric fails to convert a Pyarrow Decimal series containing NA values Nov 4, 2025
def test_to_numeric_arrow_decimal_with_na(dtype):
# GH 61641
pa = pytest.importorskip("pyarrow")
target_class = globals()[dtype]
Copy link
Member

Choose a reason for hiding this comment

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

This is very confusing. Can you parametrize with the class directly?

"ArrowDtype",
],
)
def test_to_numeric_arrow_decimal_with_na(dtype):
Copy link
Member

Choose a reason for hiding this comment

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

In a comment in the original PR, there was a request to parametrize different dtypes that should be a no-op.

On the top of my head, I think it's possible to test Int64Dtype and Float64Dtype, although, I think it will require to create another test for non-pyarrow.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: to_numeric fails to convert a Pyarrow Decimal series containing NA values.

3 participants