diff --git a/python/cudf/cudf/core/_compat.py b/python/cudf/cudf/core/_compat.py index 871ffc6269d..7dba0dc8a70 100644 --- a/python/cudf/cudf/core/_compat.py +++ b/python/cudf/cudf/core/_compat.py @@ -8,5 +8,6 @@ PANDAS_GE_210 = PANDAS_VERSION >= version.parse("2.1.0") +PANDAS_GT_214 = PANDAS_VERSION > version.parse("2.1.4") PANDAS_GE_220 = PANDAS_VERSION >= version.parse("2.2.0") PANDAS_LT_300 = PANDAS_VERSION < version.parse("3.0.0") diff --git a/python/cudf/cudf/tests/test_replace.py b/python/cudf/cudf/tests/test_replace.py index c0738bb04c8..d9f4ceaf3f7 100644 --- a/python/cudf/cudf/tests/test_replace.py +++ b/python/cudf/cudf/tests/test_replace.py @@ -13,6 +13,7 @@ from cudf.core._compat import ( PANDAS_CURRENT_SUPPORTED_VERSION, PANDAS_GE_220, + PANDAS_GT_214, PANDAS_VERSION, ) from cudf.core.dtypes import Decimal32Dtype, Decimal64Dtype, Decimal128Dtype @@ -974,7 +975,8 @@ def test_series_multiple_times_with_nulls(): def test_numeric_series_replace_dtype(request, series_dtype, replacement): request.applymarker( pytest.mark.xfail( - condition=( + condition=PANDAS_GT_214 + and ( ( series_dtype == "int8" and replacement in {128, 128.0, 32769, 32769.0}