-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Added pd.NA to nulls_fixture #31799
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
Added pd.NA to nulls_fixture #31799
Conversation
pandas/tests/indexes/test_base.py
Outdated
@@ -1964,6 +1967,9 @@ def test_isin_nan_common_float64(self, nulls_fixture): | |||
pytest.skip("pd.NaT not compatible with Float64Index") | |||
|
|||
# Float64Index overrides isin, so must be checked separately | |||
if nulls_fixture is pd.NA: | |||
pytest.xfail("Not sure how to handle with Float64Index?") |
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.
Not sure about this test. Maybe logical to support, though we also skip for pd.NaT
atm
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 don't think we should support converting pd.NA into np.nan in creating a float index, since pd.NA and np.nan behave differently
Cool! Yes, I agree it's a good idea to add it, and skip for now where it is not yet supported |
should this use the dynamic-xfail pattern we've used elsewhere? +1 on the idea |
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 (comment). ping when ready.
@@ -129,6 +129,10 @@ def test_compare_scalar_interval_mixed_closed(self, op, closed, other_closed): | |||
def test_compare_scalar_na(self, op, array, nulls_fixture): | |||
result = op(array, nulls_fixture) | |||
expected = self.elementwise_comparison(op, array, nulls_fixture) | |||
|
|||
if nulls_fixture is pd.NA: | |||
pytest.xfail("assert_numpy_array_equal broken for pd.NA") |
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 make an issue for this (and ref here)
Opened issues where I think applicable and updated comments accordingly |
Any other feedback here? |
this is ok Assume u have opened an issue for the xfail u r adding |
Thanks all for feedback |
@jorisvandenbossche
I think we should do this. Simply xfailed issues up for discussion on how to resolve