-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: resolved problem with DataFrame.equals() (#28839) #29657
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
Conversation
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.
lgtm. can you add a whatsnew note, put it in bug fixes reshaping. be pretty generic, e.g. .equals() can return True incorrectly under some circumstances.
also merge master |
…andas-dev#28839) The function was returning True in case shown in added test. The cause of the problem was sorting Blocks of DataFrame by type, and then mgr_locs before comparison. It resulted in arranging the identical blocks in the same way, which resulted in having the same two lists of blocks. Changing sorting order to (mgr_locs, type) resolves the problem, while not interrupting the other aspects of comparison.
57f3ae0
to
434d656
Compare
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.
lgtm; potentially can improve whatsnew though not a blocker for me
thanks @Reksbril |
LGTM pending Will's comment |
The function was returning True in case shown in added test. The cause
of the problem was sorting Blocks of DataFrame by type, and then
mgr_locs before comparison. It resulted in arranging the identical blocks
in the same way, which resulted in having the same two lists of blocks.
Changing sorting order to (mgr_locs, type) resolves the problem, while not
interrupting the other aspects of comparison.
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff