Skip to content

Commit 1795b18

Browse files
committed
explanation for sort when set to false
1 parent fbcbdaf commit 1795b18

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/core/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -825,7 +825,7 @@ def value_counts(
825825
If True then the object returned will contain the relative
826826
frequencies of the unique values.
827827
sort : bool, default True
828-
Sort by frequencies.
828+
Sort by frequencies when True. Preserve the order of the data when False.
829829
ascending : bool, default False
830830
Sort in ascending order.
831831
bins : int, optional

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6972,7 +6972,7 @@ def value_counts(
69726972
normalize : bool, default False
69736973
Return proportions rather than frequencies.
69746974
sort : bool, default True
6975-
Sort by frequencies.
6975+
Sort by frequencies when True. Sort by index when False.
69766976
ascending : bool, default False
69776977
Sort in ascending order.
69786978
dropna : bool, default True

0 commit comments

Comments
 (0)