-
-
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
Changes from 1 commit
dcdf2f1
1e48ecd
5ce5b33
bd0e031
e02c722
594c26f
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 |
---|---|---|
|
@@ -305,6 +305,9 @@ def test_index_ctor_infer_nat_dt_like(self, pos, klass, dtype, ctor, nulls_fixtu | |
data = [ctor] | ||
data.insert(pos, nulls_fixture) | ||
|
||
if nulls_fixture is pd.NA: | ||
pytest.xfail("Broken with pd.NA?") | ||
|
||
result = Index(data) | ||
tm.assert_index_equal(result, expected) | ||
|
||
|
@@ -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 commentThe 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 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. 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 |
||
|
||
tm.assert_numpy_array_equal( | ||
Float64Index([1.0, nulls_fixture]).isin([np.nan]), np.array([False, True]) | ||
) | ||
|
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)