Skip to content

DOC: Standardize use of "Iterate" and "Iterator" in the documentation for DataFrame and Series iterators #27861

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

Closed
benthayer opened this issue Aug 11, 2019 · 1 comment · Fixed by #27871

Comments

@benthayer
Copy link
Contributor

Documentation for DataFrame.items() and DataFrame.iteritems() say
"Iterator over..."
while other iterators for DataFrame and Series say
"Iterate over..."

All of these methods return an iterator, so I think it would make sense to have them all say "Iterator over...", although the documentation for 4/6 of the iteration methods already use "Iterate over...".

I'm not sure if there are other methods that also create iterators that we can use to justify one over the other.

https://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
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.iterrows.html
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.itertuples.html
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.items.html
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Series.iteritems.html

@jorisvandenbossche jorisvandenbossche changed the title Standardize use of "Iterate" and "Iterator" in the documentation for DataFrame and Series iterators DOC: Standardize use of "Iterate" and "Iterator" in the documentation for DataFrame and Series iterators Aug 12, 2019
@jorisvandenbossche
Copy link
Member

According to our docstring guidelines, the sentence should start with an infinite verb: https://dev.pandas.io/development/contributing_docstring.html#section-1-short-summary

So according to that it should be "Iterate over .." or "Return iterator over .." ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants