Skip to content

BUG: Fix infer_dtype result for float with embedded pd.NA #61624

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

heoh
Copy link
Contributor

@heoh heoh commented Jun 10, 2025

Description

Fix a bug in :func:api.types.infer_dtype returning "mixed-integer-float" for float and pd.NA mix.

Cause

This problem occurred because the existing is_float_array internally fixed skipna=False. It was solved by adding the skipna argument.

@heoh heoh marked this pull request as draft June 10, 2025 15:26
@heoh heoh marked this pull request as ready for review June 10, 2025 16:35
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! Just a question.

@@ -1086,10 +1086,7 @@ def convert_dtypes(
elif (
infer_objects
and input_array.dtype == object
and (
isinstance(inferred_dtype, str)
Copy link
Member

Choose a reason for hiding this comment

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

To be sure, this removal is unrelated to the other change here, is that right? That is, we can remove this line on main and it won't break any tests.

@rhshadrach rhshadrach added Bug Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate Dtype Conversions Unexpected or buggy dtype conversions labels Jun 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Dtype Conversions Unexpected or buggy dtype conversions Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: infer_dtype result for float with embedded pd.NA
2 participants