-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Use of "Yields" vs "Returns" for documentation of DataFrame.items() and DataFrame.iteritems() #27860
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
Comments
Yields is the correct one. |
There is some discussion about this here: #26114 (comment) cc @topper-123 |
Yeah, But that is a useless distinction, so I agree both could be marked as yielding. |
@topper-123 Not quite. When a function "yields", it is actually returning a generator object. The net effect is that both are functions and both return generators.
|
In any case, both return exactly the same:
so I am not fully sure why the doc validation thinks there is a difference between both. |
DataFrame.items()
says it "Yields" the label and content of the columns whereasDataFrame.iteritems()
says it "Returns" the label and content of the columnshttps://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.items.html
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.iteritems.html
The text was updated successfully, but these errors were encountered: