-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
BUG: Fix assert_series_equal for categoricals with nulls and check_category_order=False (#62008) #62011
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
BUG: Fix assert_series_equal for categoricals with nulls and check_category_order=False (#62008) #62011
Conversation
Hi @mroeschke I'd really appreciate it if you could take a look and provide feedback . Thanks! |
Hi @jorisvandenbossche, |
pandas-dev#61942) and add whatsnew note
pandas-dev#61942) and add whatsnew note
pandas-dev#61942) and add whatsnew note
pandas-dev#61942) and add whatsnew note
pandas-dev#61942) and add whatsnew note
pandas-dev#61942) and add whatsnew note
pandas-dev#61942) and add whatsnew note
pandas-dev#61942) and add whatsnew note
…tegory_order=False (pandas-dev#62008)
24ac0d7
to
1b70b3a
Compare
Description
This PR fixes an issue where
pd.testing.assert_series_equal
fails when comparing Series with categorical values containing NaNs when usingcheck_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.