Skip to content

DOC: Improve the docstring of pandas.DataFrame.append() #20267

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 10 commits into from
Jul 8, 2018
5 changes: 3 additions & 2 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5054,7 +5054,9 @@ def infer(x):
def append(self, other, ignore_index=False, verify_integrity=False):
"""
Append rows of `other` to the end of this frame, returning a new
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs to fit on a single line - can you consolidate?

object. Columns not in this frame are added as new columns.
object.

Columns not in this frame are added as new columns.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of "this frame" can you say "the caller"? Also while conceptually simple the usage of the word "Columns" mixes reference to the calling object and the object being appended, so differentiating between those would be preferable


Parameters
----------
Expand Down Expand Up @@ -5136,7 +5138,6 @@ def append(self, other, ignore_index=False, verify_integrity=False):
2 2
3 3
4 4

"""
if isinstance(other, (Series, dict)):
if isinstance(other, dict):
Expand Down