Skip to content

Conversation

Aniketsy
Copy link
Contributor

Description

This PR fixes an issue where pd.testing.assert_series_equal fails when comparing Series with categorical values containing NaNs when using check_category_order=False.

Problem

When using left.categories.take(left.codes) for comparing category values, null codes (-1) were not handled correctly, causing incorrect comparisons.

Please let me know if my approach or fix needs any improvements . I’m open to feedback and happy to make changes based on suggestions.

@Aniketsy
Copy link
Contributor Author

Hi @mroeschke
This PR fixes an issue where pd.testing.assert_series_equal fails when comparing Series with categorical values containing NaNs when using check_category_order=False.

I'd really appreciate it if you could take a look and provide feedback .
Please let me know if anything needs to be improved or clarified.

Thanks!

@Aniketsy
Copy link
Contributor Author

Aniketsy commented Aug 1, 2025

Hi @jorisvandenbossche,
Could you please review this PR and let me know if any changes are needed.
Also,I want to ask if the is issue already assigned to someone should I continue working on it or leave it to the current assignee?
Thanks!

@Aniketsy Aniketsy force-pushed the fix-assert-categorical-equal-nans branch from 24ac0d7 to 1b70b3a Compare August 13, 2025 23:07
@Aniketsy Aniketsy closed this Aug 13, 2025
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.

1 participant