Skip to content

DOC: Enforce Numpy Docstring Validation for pandas.Index.get_indexer_non_unique #58508

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
Show file tree
Hide file tree
Changes from all 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
1 change: 0 additions & 1 deletion ci/code_checks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
-i "pandas.Index PR07" \
-i "pandas.Index.get_indexer PR07,SA01" \
-i "pandas.Index.get_indexer_for PR01,SA01" \
-i "pandas.Index.get_indexer_non_unique PR07,SA01" \
-i "pandas.Index.get_loc PR07,RT03,SA01" \
-i "pandas.Index.join PR07,RT03,SA01" \
-i "pandas.Index.names GL08" \
Expand Down
7 changes: 7 additions & 0 deletions pandas/core/indexes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -5843,6 +5843,7 @@ def _should_fallback_to_positional(self) -> bool:
Parameters
----------
target : %(target_klass)s
An iterable containing the values to be used for computing indexer.

Returns
-------
Expand All @@ -5854,6 +5855,12 @@ def _should_fallback_to_positional(self) -> bool:
An indexer into the target of the values not found.
These correspond to the -1 in the indexer array.

See Also
--------
Index.get_indexer : Computes indexer and mask for new index given
the current index.
Index.get_indexer_for : Returns an indexer even when non-unique.

Examples
--------
>>> index = pd.Index(['c', 'b', 'a', 'b', 'b'])
Expand Down