-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG/API: other object type check in Series/DataFrame.equals #34402
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
Merged
jreback
merged 9 commits into
pandas-dev:master
from
jorisvandenbossche:equals-constructor
Jul 15, 2020
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
63d7825
BUG/API: other object type check in Series/DataFrame.equals
jorisvandenbossche 75f5749
Merge remote-tracking branch 'upstream/master' into equals-constructor
jorisvandenbossche f148449
allow subclass + add test
jorisvandenbossche df88cb8
Merge remote-tracking branch 'upstream/master' into equals-constructor
jorisvandenbossche 348f706
use SubclassedSeries
jorisvandenbossche 1759221
add whatsnew
jorisvandenbossche f530286
Merge remote-tracking branch 'upstream/master' into equals-constructor
jorisvandenbossche 66293a5
add dataframe test
jorisvandenbossche bcca6b7
Merge remote-tracking branch 'upstream/master' into equals-constructor
TomAugspurger File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can you put this in tests/series/test_sublcass and similar for frame/test_sublcass
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 is not a test about the subclass working correctly (anything related to the subclassing machinery, eg correct use of
_constructor
to preserve the subclass in operations etc), but only about our own equals method accepting subclasses, so I think the test rather fits here with the otherequals
tests.But I can certainly use the
tm.SubclassedSeries
helper to avoid creating a dummy class here.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.
i think this belongs with the rest of the tests & needs for DataFrame subclass as well. having 2 places is just very friendly to future folks.
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.
Having 2 places where
equals
is tested is equally unfriendly I think ..Both ways have some aspect of the tests splitted in two places, and as mentioned above, this test is actually about our
equals
implementation, not about the behaviour of a subclassing mechanism, and thus more belongs here IMO.Will add dataframe to the test
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.
pls just move this, ALL subclass tests are in the same file. This is breaking the pattern for no reason.