ueshin commented on a change in pull request #33485:
URL: https://github.com/apache/spark/pull/33485#discussion_r675261177



##########
File path: python/pyspark/pandas/categorical.py
##########
@@ -439,8 +439,47 @@ def remove_categories(
             else:
                 return psser
 
-    def remove_unused_categories(self) -> "ps.Series":
-        raise NotImplementedError()
+    def remove_unused_categories(self, inplace: bool = False) -> 
Optional["ps.Series"]:
+        """
+        Remove categories which are not used.
+
+        Parameters
+        ----------
+        inplace : bool, default False
+           Whether or not to drop unused categories inplace or return a copy of
+           this categorical with unused categories dropped.

Review comment:
       Cool. Let me address it in a clean-up PR later. SPARK-36267




-- 
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]

Reply via email to