-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SPARK-40500][PS] Deprecate
iteritems
in DataFrame and Seriese
### What changes were proposed in this pull request? 1. Use `pd.items` instead of `pd.iteritems` 2. Deprecate `ps.iteritems` ### Why are the changes needed? `pd.iteritems` is deprecated in 1.5 before: ``` In [4]: import pyspark.pandas as ps In [5]: ps.Series([3, 4, 1, 1, 5]) /Users/ruifeng.zheng/Dev/spark/python/pyspark/pandas/internal.py:1573: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. fields = [ /Users/ruifeng.zheng/Dev/spark/python/pyspark/sql/pandas/conversion.py:486: FutureWarning: iteritems is deprecated and will be removed in a future version. Use .items instead. for column, series in pdf.iteritems(): 0 3 1 4 2 1 3 1 4 5 dtype: int64 ``` after: ``` In [1]: import pyspark.pandas as ps In [2]: ps.Series([3, 4, 1, 1, 5]) 0 3 1 4 2 1 3 1 4 5 dtype: int64 ``` ### Does this PR introduce _any_ user-facing change? Eliminate `iteritems` warnings ### How was this patch tested? existing UT Closes #37947 from zhengruifeng/ps_iteritems_to_items. Lead-authored-by: Ruifeng Zheng <ruifengz@apache.org> Co-authored-by: Hyukjin Kwon <gurwls223@gmail.com> Signed-off-by: Hyukjin Kwon <gurwls223@apache.org>
- Loading branch information
1 parent
f89b847
commit 44573a2
Showing
6 changed files
with
28 additions
and
14 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
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