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
6 changes: 3 additions & 3 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -5053,8 +5053,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
object. Columns not in this frame are added as new columns.
Append rows of `other` to the end of `caller`, returning a new object.
Copy link
Member

Choose a reason for hiding this comment

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

'caller' is not needed to quote (it's not an argument).

Also given this is the docstring specific to DataFrame (not shared with Series), I think we can be more specific. So maybe "calling DataFrame" ? (or is it then too long ?)


Columns not in the caller 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.

Better but for explicitness say "Columns in other not in caller are ..."


Parameters
----------
Expand Down Expand Up @@ -5136,7 +5137,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