Skip to content

DOC:Use of "Yields" for documentation of DataFrame.iteritems() #27876

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

Merged
merged 3 commits into from
Aug 14, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,8 @@ def style(self):
Iterates over the DataFrame columns, returning a tuple with
the column name and the content as a Series.

%s
Yields
------
label : object
The column names for the DataFrame being iterated over.
content : Series
Expand Down Expand Up @@ -816,7 +817,7 @@ def style(self):
Name: population, dtype: int64
"""

@Appender(_shared_docs["items"] % "Yields\n ------")
@Appender(_shared_docs["items"])
def items(self):
if self.columns.is_unique and hasattr(self, "_item_cache"):
for k in self.columns:
Expand All @@ -825,9 +826,9 @@ def items(self):
for i, k in enumerate(self.columns):
yield k, self._ixs(i, axis=1)

@Appender(_shared_docs["items"] % "Returns\n -------")
@Appender(_shared_docs["items"])
def iteritems(self):
return self.items()
yield from self.items()

def iterrows(self):
"""
Expand Down