We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e63667 commit 5550b1dCopy full SHA for 5550b1d
pandas/tests/indexes/test_common.py
@@ -440,6 +440,10 @@ def test_hasnans_isnans(self, index_flat):
440
@pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning")
441
@pytest.mark.parametrize("na_position", [None, "middle"])
442
def test_sort_values_invalid_na_position(index_with_missing, na_position):
443
+ non_na_values = [x for x in index_with_missing if pd.notna(x)]
444
+ if len({type(x) for x in non_na_values}) > 1:
445
+ pytest.xfail("Sorting fails due to heterogeneous types in index (int vs str)")
446
+
447
with pytest.raises(ValueError, match=f"invalid na_position: {na_position}"):
448
index_with_missing.sort_values(na_position=na_position)
449
0 commit comments