|
25 | 25 |
|
26 | 26 | import cudf
|
27 | 27 | from cudf.api.extensions import no_default
|
28 |
| -from cudf.core._compat import PANDAS_GE_200, PANDAS_GE_210, PANDAS_LT_203 |
| 28 | +from cudf.core._compat import ( |
| 29 | + PANDAS_GE_200, |
| 30 | + PANDAS_GE_210, |
| 31 | + PANDAS_GE_220, |
| 32 | + PANDAS_LT_203, |
| 33 | +) |
29 | 34 | from cudf.core.buffer.spill_manager import get_global_manager
|
30 | 35 | from cudf.core.column import column
|
31 | 36 | from cudf.errors import MixedTypeError
|
@@ -3562,8 +3567,16 @@ def test_dataframe_empty_sort_index():
|
3562 | 3567 | @pytest.mark.parametrize("inplace", [True, False])
|
3563 | 3568 | @pytest.mark.parametrize("na_position", ["first", "last"])
|
3564 | 3569 | def test_dataframe_sort_index(
|
3565 |
| - index, axis, ascending, inplace, ignore_index, na_position |
| 3570 | + request, index, axis, ascending, inplace, ignore_index, na_position |
3566 | 3571 | ):
|
| 3572 | + request.applymarker( |
| 3573 | + pytest.mark.xfail( |
| 3574 | + condition=not PANDAS_GE_220 |
| 3575 | + and axis in (1, "columns") |
| 3576 | + and ignore_index, |
| 3577 | + reason="Bug fixed in pandas-2.2", |
| 3578 | + ) |
| 3579 | + ) |
3567 | 3580 | pdf = pd.DataFrame(
|
3568 | 3581 | {"b": [1, 3, 2], "a": [1, 4, 3], "c": [4, 1, 5]},
|
3569 | 3582 | index=index,
|
@@ -3618,12 +3631,22 @@ def test_dataframe_mulitindex_sort_index(
|
3618 | 3631 | ):
|
3619 | 3632 | request.applymarker(
|
3620 | 3633 | pytest.mark.xfail(
|
3621 |
| - condition=axis in (1, "columns") |
| 3634 | + condition=not PANDAS_GE_220 |
| 3635 | + and axis in (1, "columns") |
3622 | 3636 | and ignore_index
|
3623 | 3637 | and not (level is None and not ascending),
|
3624 | 3638 | reason="https://github.com/pandas-dev/pandas/issues/56478",
|
3625 | 3639 | )
|
3626 | 3640 | )
|
| 3641 | + request.applymarker( |
| 3642 | + pytest.mark.xfail( |
| 3643 | + condition=axis in (1, "columns") |
| 3644 | + and level is None |
| 3645 | + and not ascending |
| 3646 | + and ignore_index, |
| 3647 | + reason="https://github.com/pandas-dev/pandas/issues/57293", |
| 3648 | + ) |
| 3649 | + ) |
3627 | 3650 | pdf = pd.DataFrame(
|
3628 | 3651 | {
|
3629 | 3652 | "b": [1.0, 3.0, np.nan],
|
|
0 commit comments