xinrong-databricks commented on a change in pull request #33757:
URL: https://github.com/apache/spark/pull/33757#discussion_r690605149



##########
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"])),

Review comment:
       Shall we rename `kcser` to `pscser`? It's fine to do it in a separate PR 
though.




-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to