forked from apache/spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-43568][SPARK-43633][PS] Support
Categorical
APIs for pandas 2
### What changes were proposed in this pull request? This PR proposes to support `Categorical` APIs for [pandas 2](https://pandas.pydata.org/docs/dev/whatsnew/v2.0.0.html), and match the behavior. ### Why are the changes needed? To support pandas API on Spark with pandas 2.0.0 and above. ### Does this PR introduce _any_ user-facing change? The behavior is matched with pandas 2.0.0 and above. e.g. ```diff >>> psser 0 1 1 2 2 3 3 1 4 2 5 3 Name: a, dtype: category Categories (3, int64): [1, 2, 3] >>> psser.cat.remove_categories([1, 2, 3]) 0 NaN 1 NaN 2 NaN 3 NaN 4 NaN 5 NaN Name: a, dtype: category - Categories (0, object): [] + Categories (0, int64): [] ``` ### How was this patch tested? Enabling the existing tests. Closes apache#42273 from itholic/pandas_categorical. Authored-by: itholic <haejoon.lee@databricks.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
- Loading branch information
Showing
3 changed files
with
24 additions
and
81 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters