Skip to content

Conversation

@AnonToky
Copy link
Contributor

@AnonToky AnonToky commented Nov 2, 2025

Adds small, focused tests covering nullable dtype casting behavior to ensure missing values are preserved or converted as expected during astype operations.

Adds pandas/tests/dtypes/test_nullable_astype.py with:

test_series_astype_nullable_int_preserves_nans: float -> Int64 should convert NaN to .
test_series_astype_from_nullable_int_to_float_roundtrip: Int64 -> float -> Int64 roundtrip preserves missingness.
test_nullable_series_astype_various_dtypes_preserve_missing: parametrized coverage for Int32/Int64/Float32/Float64.

Rationale:

Small, deterministic tests that exercise edge cases around pd.NA and numpy NaN during dtype conversion.
No behavioral changes to core code; this enhances test coverage and guards against regressions.
How to run locally: pytest -q pandas/tests/dtypes/test_nullable_astype.py

Notes:

Uses pandas.testing assertions and pytest parametrization.
No external dependencies or network I/O.

@jbrockmendel
Copy link
Member

This looks like AI.

@jbrockmendel jbrockmendel added the AI Slop Suspected of being AI-generated, which is not welcome. label Nov 3, 2025
@mroeschke
Copy link
Member

Thanks for the PR, but it doesn't appear to be related to an open issue and doesn't follow the testing conventions of the repository so closing

@mroeschke mroeschke closed this Nov 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Slop Suspected of being AI-generated, which is not welcome.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants