Skip to content

Commit f26c116

Browse files
committed
Skip categories setter
1 parent 33e07f3 commit f26c116

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

python/pyspark/pandas/tests/indexes/test_category.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ def test_categories_setter(self):
8282

8383
pidx.categories = ["z", "y", "x"]
8484
psidx.categories = ["z", "y", "x"]
85-
if LooseVersion(pd.__version__) >= LooseVersion("1.1"):
85+
# Pandas deprecated all the in-place category-setting behaviors, dtypes also not be
86+
# refreshed in categories.setter since Pandas 1.4+, we should also consider to clean up
87+
# this test when in-place category-setting removed:
88+
# https://github.com/pandas-dev/pandas/issues/46820
89+
if LooseVersion("1.4") >= LooseVersion(pd.__version__) >= LooseVersion("1.1"):
8690
self.assert_eq(pidx, psidx)
8791
self.assert_eq(pdf, psdf)
8892
else:

0 commit comments

Comments
 (0)