Skip to content
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: is comparison (almost) always False for pandas.Index #143

Closed
veni-vidi-vici-dormivi opened this issue Jan 10, 2025 · 1 comment · Fixed by #145
Closed

BUG: is comparison (almost) always False for pandas.Index #143

veni-vidi-vici-dormivi opened this issue Jan 10, 2025 · 1 comment · Fixed by #145
Labels
bug Something isn't working

Comments

@veni-vidi-vici-dormivi
Copy link
Collaborator

Comparing two pandas.Index with is will almost always return False since pandas.Index are always different objects even if they have the same contents. This means we need to switch to == in this case. Of course the only case when it is True both are actually the same object which is of course what I naively did in the tests. Sorry. Might consider doing a new release with this bug fix as soon as possible.

if self.df.columns is not other.df.columns:
raise ValueError("FileContainers must have the same keys.")

@veni-vidi-vici-dormivi veni-vidi-vici-dormivi added the bug Something isn't working label Jan 10, 2025
@mathause
Copy link
Collaborator

Good catch - also missed that in the review.

@veni-vidi-vici-dormivi veni-vidi-vici-dormivi changed the title BUG: is comparison (almost) always False for immutable pandas.Index BUG: is comparison (almost) always False for pandas.Index Jan 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
2 participants