-
Notifications
You must be signed in to change notification settings - Fork 28.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SPARK-40500][PS] Deprecate iteritems
in DataFrame and Seriese
#37947
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems OK, but there also seem to be more usages in the code, like in frame.py and test_dataframe.py - are those usages the same, also deprecated?
remaining as to the deprecation of PS's |
Yeah let's match w/ pandas |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as to the deprecation of PS's iteritems, I think we can deprecate them now
Agree. And items
are also supported by _minimum_pandas_version (v1.0.5), so it's a safe change.
>>> pd.__version__
'1.0.5'
>>> pd.Series([3, 4, 1, 1, 5]).iteritems()
<zip object at 0x7f2087983280>
>>> pd.Series([3, 4, 1, 1, 5]).items()
<zip object at 0x7f2087afcb80>
so LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then maybe should we also add .. deprecated:: 3.4.0
into the docstring of DataFrame.iteritems
and Series.iteritems
??
Otherwise, LGTM.
pd.items
instead of pd.iteritems
iteritems
in DataFrame and Seriese
Merged to master. |
Thank you all! |
What changes were proposed in this pull request?
pd.items
instead ofpd.iteritems
ps.iteritems
Why are the changes needed?
pd.iteritems
is deprecated in 1.5before:
after:
Does this PR introduce any user-facing change?
Eliminate
iteritems
warningsHow was this patch tested?
existing UT