-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
BUG: Fix TypeError in assert_index_equal when comparing CategoricalIndex with check_categorical=True and exact=False #61941
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
base: main
Are you sure you want to change the base?
Conversation
…dex with check_categorical=True and exact=False
Hi @mroeschke I'd really appreciate it if you could take a look and provide feedback . Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also needs a unit test
333eb89
to
5edf8ce
Compare
Hi @mroeschke, Thank you for your review. I’ve updated the PR based on your feedback ,please have a look when convenient. Additionally, I noticed one check failure (pre-commit.ci-pr) and wanted to ask if you could help clarify the reason behind it. Apologies if this isn't the appropriate way to raise this, please do let me know the correct approach if needed. Thanks again! |
de5b16b
to
08739f2
Compare
![]() Hi @jorisvandenbossche, I ran pre-commit locally and all hooks passed. However, the GitHub checks are still showing a failure. Could you please advise if I’ve missed something? |
#61935
Fixes a bug where
assert_index_equal
raises aTypeError
instead ofAssertionError
when comparing twoCategoricalIndex
objects withcheck_categorical=True
andexact=False
.Ensures consistency with expected testing behavior by properly raising an
AssertionError
in these cases.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.