From 47e3b409deb41f18e30e447579cba3a246db050e Mon Sep 17 00:00:00 2001 From: MeeseeksMachine <39504233+meeseeksmachine@users.noreply.github.com> Date: Fri, 11 Feb 2022 09:00:09 -0800 Subject: [PATCH] Backport PR #45587: DOC: append deprecation (#45942) Co-authored-by: gesoos <66533786+gesoos@users.noreply.github.com> --- doc/source/whatsnew/v1.4.0.rst | 6 +++--- pandas/core/frame.py | 4 ++++ pandas/core/series.py | 4 ++++ 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/doc/source/whatsnew/v1.4.0.rst b/doc/source/whatsnew/v1.4.0.rst index 47a087d38d146..7340f2475e1f6 100644 --- a/doc/source/whatsnew/v1.4.0.rst +++ b/doc/source/whatsnew/v1.4.0.rst @@ -637,11 +637,11 @@ will continue to return :class:`Int64Index`, :class:`UInt64Index` and .. _whatsnew_140.deprecations.frame_series_append: -Deprecated Frame.append and Series.append -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Deprecated DataFrame.append and Series.append +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ :meth:`DataFrame.append` and :meth:`Series.append` have been deprecated and will -be removed in Pandas 2.0. Use :func:`pandas.concat` instead (:issue:`35407`). +be removed in a future version. Use :func:`pandas.concat` instead (:issue:`35407`). *Deprecated syntax* diff --git a/pandas/core/frame.py b/pandas/core/frame.py index a9befb3012343..b89f702bc103b 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -8930,6 +8930,10 @@ def append( """ Append rows of `other` to the end of caller, returning a new object. + .. deprecated:: 1.4.0 + Use :func:`concat` instead. For further details see + :ref:`whatsnew_140.deprecations.frame_series_append` + Columns in `other` that are not in the caller are added as new columns. Parameters diff --git a/pandas/core/series.py b/pandas/core/series.py index 53ff67220a96d..990da147340b2 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -2853,6 +2853,10 @@ def append( """ Concatenate two or more Series. + .. deprecated:: 1.4.0 + Use :func:`concat` instead. For further details see + :ref:`whatsnew_140.deprecations.frame_series_append` + Parameters ---------- to_append : Series or list/tuple of Series