diff --git a/pandas/core/series.py b/pandas/core/series.py index 14b4e084cdeae..c3300e7b35a8b 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -1642,8 +1642,9 @@ def sort(self, axis=0, kind='quicksort', order=None, ascending=True): raise ValueError("This Series is a view of some other array, to " "sort in-place you must create a copy") - result = self.order(na_last=True, kind=kind, - ascending=ascending) + result = self.order(kind=kind, + ascending=ascending, + na_position='last') self._update_inplace(result) @@ -1768,7 +1769,7 @@ def order(self, na_last=None, ascending=True, kind='mergesort', na_position='las warnings.warn(("na_last is deprecated. Please use na_position instead"), FutureWarning) na_position = 'last' if na_last else 'first' - + def _try_kind_sort(arr): # easier to ask forgiveness than permission try: