Skip to content

added link to advanced indexing guide in .loc docstring #47520

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 2 commits into from
Jun 28, 2022
Merged
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,10 @@ def loc(self) -> _LocIndexer:
sidewinder mark i 10 20
mark ii 1 4
viper mark ii 7 1

For more details and explanations on advanced indexing,
please visit the following link:
https://pandas.pydata.org/docs/user_guide/advanced.html#advanced-indexing-with-hierarchical-index
Copy link
Member

Choose a reason for hiding this comment

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

Could you use a sphinx style reference like

Please see the :ref:`user guide<advanced.advanced_hierarchical>` for more details and explanations of advanced indexing.

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, I went ahead and pushed the change to my repo

"""
return _LocIndexer("loc", self)

Expand Down