Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
6 changes: 5 additions & 1 deletion pandas/core/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -997,8 +997,12 @@ def value_counts(
when False.

.. versionchanged:: 3.0.0

Prior to 3.0.0, the sort was unstable.

.. versionchanged:: 2.2.0
The default sort kind 'quicksort' is deterministic,
i.e. it produces the same result for the same input on each run.

ascending : bool, default False
Sort in ascending order.
bins : int, optional
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -7337,6 +7337,11 @@ def sort_values(
information. `mergesort` and `stable` are the only stable algorithms. For
DataFrames, this option is only applied when sorting on a single
column or label.

.. versionchanged:: 2.2.0

The default sort kind 'quicksort' is deterministic,
i.e. it produces the same result for the same input on each run.
na_position : {'first', 'last'}, default 'last'
Puts NaNs at the beginning if `first`; `last` puts NaNs at the
end.
Expand Down Expand Up @@ -7657,6 +7662,11 @@ def sort_index(
information. `mergesort` and `stable` are the only stable algorithms. For
DataFrames, this option is only applied when sorting on a single
column or label.

.. versionchanged:: 2.2.0

The default sort kind 'quicksort' is deterministic,
i.e. it produces the same result for the same input on each run.
na_position : {'first', 'last'}, default 'last'
Puts NaNs at the beginning if `first`; `last` puts NaNs at the end.
Not implemented for MultiIndex.
Expand Down
10 changes: 10 additions & 0 deletions pandas/core/series.py
Original file line number Diff line number Diff line change
Expand Up @@ -3500,6 +3500,11 @@ def sort_values(
kind : {'quicksort', 'mergesort', 'heapsort', 'stable'}, default 'quicksort'
Choice of sorting algorithm. See also :func:`numpy.sort` for more
information. 'mergesort' and 'stable' are the only stable algorithms.

.. versionchanged:: 2.2.0
The default sort kind 'quicksort' is deterministic,
i.e. it produces the same result for the same input on each run.

na_position : {'first' or 'last'}, default 'last'
Argument 'first' puts NaNs at the beginning, 'last' puts NaNs at
the end.
Expand Down Expand Up @@ -3746,6 +3751,11 @@ def sort_index(
information. 'mergesort' and 'stable' are the only stable algorithms. For
DataFrames, this option is only applied when sorting on a single
column or label.

.. versionchanged:: 2.2.0

The default sort kind 'quicksort' is deterministic,
i.e. it produces the same result for the same input on each run.
na_position : {'first', 'last'}, default 'last'
If 'first' puts NaNs at the beginning, 'last' puts NaNs at the end.
Not implemented for MultiIndex.
Expand Down
Loading