-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: check inequality by comparing categorical with NaN ( #28384 ) #36520
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
81d01e6
to
dd2bf25
Compare
Please review. And I need some help. |
@@ -148,3 +148,13 @@ def test_use_inf_as_na_outside_context(self, values, expected): | |||
result = pd.isna(DataFrame(cat)) | |||
expected = DataFrame(expected) | |||
tm.assert_frame_equal(result, expected) | |||
|
|||
def test_compare_unequal(self): |
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.
test_compare_categorical_with_missing
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.
Thank you. Fixed.
c64a8d3
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 possibly add a non-categorical example since the OP was about the difference in behavior between categorical vs. non-categorical. See #28384 (comment)
Re: CI failures those are unrelated I think. Merge with master and they'll be rerun
625617e
to
582dfef
Compare
Thank you for your input. I added test case. |
@@ -148,3 +148,22 @@ def test_use_inf_as_na_outside_context(self, values, expected): | |||
result = pd.isna(DataFrame(cat)) | |||
expected = DataFrame(expected) | |||
tm.assert_frame_equal(result, expected) | |||
|
|||
def test_compare_categorical_with_missing(self): |
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 fully replicate the tests in the OP, e.g. add for == as well.
ideally parameterize this over these 4 cases (or 2 and 2 in-line if easier).
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.
Thank you for review. Done.
8b88121
to
23dd988
Compare
thanks @junjunjunk |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff