-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST add test case for drop_duplicates #35121
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
Hello @r-toroxel! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-07-07 17:55:33 UTC |
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.
Does this close a particular issue?
No. |
def test_drop_duplicates_inplace_result(): | ||
df = DataFrame({"a": [1, 2, 3], "b": [1, 2, 4], "c": [1, 6, 5]}) | ||
result = df.drop_duplicates(inplace=True) | ||
assert result is None |
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 use assert_frame_equal(df, expected) and construct the expected.
ideally this test goes with other basic drop_duplicates call and we parameterize on inplace
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.
yes. just checking the return value goes well with the existing
test_drop_duplicates_inplace
moved it there.
expected = orig[:2] | ||
result = df | ||
tm.assert_frame_equal(result, expected) | ||
assert(return_value is None) |
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.
Nit: You can remove the parenthesis from all of these assert
s
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.
thx!
thanks @r-toroxel happy to take PRs to verify other inplace ops return None |
thanks. yes. created an issue. #35179 |
Add a test case to drop_duplicates for inplace=True.