Skip to content

Commit a80d657

Browse files
VomVim-vinicius
authored and
im-vinicius
committed
Modified the doc string of value_counts for DataFrame and series when sort arg is set to false (pandas-dev#52857)
1 parent 381fe9d commit a80d657

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pandas/core/base.py

+1-1
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

+1-1
Original file line numberDiff line numberDiff line change
@@ -6964,7 +6964,7 @@ def value_counts(
69646964
normalize : bool, default False
69656965
Return proportions rather than frequencies.
69666966
sort : bool, default True
6967-
Sort by frequencies.
6967+
Sort by frequencies when True. Sort by DataFrame column values when False.
69686968
ascending : bool, default False
69696969
Sort in ascending order.
69706970
dropna : bool, default True

0 commit comments

Comments
 (0)