Skip to content
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

DOC: append deprecation #45587

Merged
merged 10 commits into from
Feb 11, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
4 changes: 4 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -8936,6 +8936,10 @@ def append(

Columns in `other` that are not in the caller are added as new columns.

.. deprecated:: 1.4.0
append is deprecated,
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know if we need 'append is deprecated'. This IS the append doc-string. We don't do this anywhere else.

Also capital the first letter of the sentence.

Copy link
Member

Choose a reason for hiding this comment

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

@jreback isn't it the same as in lookup https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.lookup.html , where it says

DataFrame.lookup is deprecated

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I took inspiration from existing messages that describe the issue. Since append refers to the method, I would not capitalize it.

Copy link
Contributor

Choose a reason for hiding this comment

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

sure lookup is a full message, this is not.

Copy link
Contributor

Choose a reason for hiding this comment

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

i am ok if its a full sentence in a similar way.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

@gesoos I think if you make it similar to how lookup is (suggest to use concat instead, and point to the relevant part of the user guide if there is one - check the whatsnew note) it'll be OK

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah we would like to make these consistent.

use pandas.concat instead.

Parameters
----------
other : DataFrame or Series/dict-like object, or list of these
Expand Down
4 changes: 4 additions & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -2865,6 +2865,10 @@ def append(
"""
Concatenate two or more Series.

.. deprecated:: 1.4.0
append is deprecated,
use pandas.concat instead.

Parameters
----------
to_append : Series or list/tuple of Series
Expand Down