From 899a931adab2debd7214b8985c905420b8545dda Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Thu, 12 Dec 2019 17:13:57 -0800 Subject: [PATCH 1/2] DEPR: change DataFrame.append default sort kwarg --- pandas/core/frame.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index fa85c54eb42fa..4fa21422751c8 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6664,7 +6664,7 @@ def infer(x): # ---------------------------------------------------------------------- # Merging / joining methods - def append(self, other, ignore_index=False, verify_integrity=False, sort=None): + def append(self, other, ignore_index=False, verify_integrity=False, sort=False): """ Append rows of `other` to the end of caller, returning a new object. @@ -6678,14 +6678,13 @@ def append(self, other, ignore_index=False, verify_integrity=False, sort=None): If True, do not use the index labels. verify_integrity : bool, default False If True, raise ValueError on creating index with duplicates. - sort : bool, default None + sort : bool, default False Sort columns if the columns of `self` and `other` are not aligned. - The default sorting is deprecated and will change to not-sorting - in a future version of pandas. Explicitly pass ``sort=True`` to - silence the warning and sort. Explicitly pass ``sort=False`` to - silence the warning and not sort. .. versionadded:: 0.23.0 + .. versionchanged:: 1.0.0 + + Changed to not sort by default. Returns ------- From a40d8b6332a5763d0c5121e01c0e6c26cc697a42 Mon Sep 17 00:00:00 2001 From: jbrockmendel Date: Fri, 13 Dec 2019 01:05:53 -0800 Subject: [PATCH 2/2] Update pandas/core/frame.py Co-Authored-By: Joris Van den Bossche --- pandas/core/frame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 4fa21422751c8..66226d4ef0fe7 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -6684,7 +6684,7 @@ def append(self, other, ignore_index=False, verify_integrity=False, sort=False): .. versionadded:: 0.23.0 .. versionchanged:: 1.0.0 - Changed to not sort by default. + Changed to not sort by default. Returns -------