Skip to content

DOC: sort has no effect on filters #51825

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

Merged
merged 7 commits into from
Mar 10, 2023
Merged
Changes from 3 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
2 changes: 2 additions & 0 deletions pandas/core/shared_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,8 @@
Sort group keys. Get better performance by turning this off.
Note this does not influence the order of observations within each
group. Groupby preserves the order of rows within each group.
This argument has no effect on some aggregating functions, such as
:ref:`head, tail <basics.aggregate>` and ``nth[:]``.
Copy link
Member

Choose a reason for hiding this comment

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

it might be good to mention "filtrations" rather than "some aggregating functions", and link to the "filtrations" section introduced in https://github.com/pandas-dev/pandas/pull/51704/files?

as yes, it might be good to note it in as_index too

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, I did as you suggested. I think ci failures aren't related to my changes.

Copy link
Member

Choose a reason for hiding this comment

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

thanks!

not sure, it's showing

/home/runner/work/pandas/pandas/pandas/core/frame.py:docstring of pandas.core.frame.DataFrame.groupby:210: WARNING: Duplicate explicit target name: "groupby user guide".
/home/runner/work/pandas/pandas/pandas/core/frame.py:docstring of pandas.core.frame.DataFrame.groupby:210: WARNING: Duplicate explicit target name: "groupby user guide".
/home/runner/work/pandas/pandas/pandas/core/series.py:docstring of pandas.core.series.Series.groupby:188: WARNING: Duplicate explicit target name: "groupby user guide".
/home/runner/work/pandas/pandas/pandas/core/series.py:docstring of pandas.core.series.Series.groupby:188: WARNING: Duplicate explicit target name: "groupby user guide".

which might be due to the link you wrote?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the comment. I agree, the warnings are related to my changes. There are two different links in one doctsring with the same name, which causes the problem. I changed the name of my link.

It’s interesting, while I run validation
python scripts/validate_docstrings.py pandas.core.groupby.DataFrameGroupBy and
python scripts/validate_docstrings.py pandas.core.groupby.SeriesGroupBy there were no warnings.

After validation, I cleaned and built new documentation locally. Then I just checked html, my links worked right. My mistake, I should check warnings raised by the build.


.. versionchanged:: 2.0.0

Expand Down