-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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: Duplicated returns boolean dataframe #25234
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -182,6 +182,12 @@ def test_drop_duplicates(): | |
assert df.duplicated(keep=keep).sum() == 0 | ||
|
||
|
||
def test_duplicated_on_empty_frame_gives_back_frame(): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can you add the issue number as a comment here, rename the test to test_duplicated_on_empty_frame |
||
df = DataFrame(columns=['a', 'b']) | ||
dupes = df.duplicated('a') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. result = |
||
tm.assert_frame_equal(df[dupes], df) | ||
|
||
|
||
def test_drop_duplicates_with_duplicate_column_names(): | ||
# GH17836 | ||
df = DataFrame([ | ||
|
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.
say more like
:meth:DataFrame.duplicate()
on empty dataframe was not return a boolean dtyped SeriesThere 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 can go in 0.24.2