Skip to content

DOC: Improve sort parameter doc of DataFrameGroupBy.value_counts #59412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 changes: 2 additions & 2 deletions pandas/core/groupby/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -746,7 +746,7 @@ def value_counts(
normalize : bool, default False
Return proportions rather than frequencies.
sort : bool, default True
Sort by frequencies.
Sort by frequencies when True. Preserve the order of the data when False.
ascending : bool, default False
Sort in ascending order.
bins : int or list of ints, optional
Expand Down Expand Up @@ -2303,7 +2303,7 @@ def value_counts(
normalize : bool, default False
Return proportions rather than frequencies.
sort : bool, default True
Sort by frequencies.
Sort by frequencies when True. Sort by DataFrame column values when False.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we also want to modify the docstring on SeriesGroupBy.value_counts. Can you make the same adjustment there.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure thing

ascending : bool, default False
Sort in ascending order.
dropna : bool, default True
Expand Down