ueshin commented on a change in pull request #33757:
URL: https://github.com/apache/spark/pull/33757#discussion_r690643343
##########
File path: python/pyspark/pandas/tests/test_categorical.py
##########
@@ -243,18 +243,16 @@ def test_astype(self):
self.assert_eq(kcser.astype("category"), pcser.astype("category"))
+ # CategoricalDtype is not updated if the dtype is same from pandas 1.3.
if LooseVersion(pd.__version__) >= LooseVersion("1.3"):
- # TODO(SPARK-36367): Fix the behavior to follow pandas >= 1.3
- pass
- elif LooseVersion(pd.__version__) >= LooseVersion("1.2"):
self.assert_eq(
kcser.astype(CategoricalDtype(["b", "c", "a"])),
pcser.astype(CategoricalDtype(["b", "c", "a"])),
)
else:
self.assert_eq(
kcser.astype(CategoricalDtype(["b", "c", "a"])),
- pser.astype(CategoricalDtype(["b", "c", "a"])),
+ kcser,
Review comment:
btw, nit: this should be `pcser` instead of `kcser`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]