Skip to content

Conversation

sah0725
Copy link
Contributor

@sah0725 sah0725 commented Oct 4, 2025

Fixes #62562

Summary

Updated the documentation for pandas.api.indexers.check_array_indexer to clarify that it accepts integer and slice indexers in addition to array-like inputs.

Changes Made

  • Updated parameter documentation to explicitly mention int, slice, and other non-array indexers are accepted
  • Added examples showing int and slice usage in the docstring
  • Improved clarity by explaining that non-array indexers are passed through as-is

Issue Reference

The function already accepted these input types but the documentation only mentioned "array-like or list-like", which was misleading. This PR makes the documentation consistent with the actual behavior.

sah0725 and others added 4 commits October 4, 2025 13:12
- Updated parameter documentation to explicitly mention int, slice,
  and other non-array indexers are accepted
- Added examples showing int and slice usage
- Fixes pandas-dev#62562
@mroeschke mroeschke added the Docs label Oct 5, 2025
@mroeschke mroeschke added this to the 3.0 milestone Oct 5, 2025
@mroeschke mroeschke merged commit 458c9f9 into pandas-dev:main Oct 5, 2025
47 checks passed
@mroeschke
Copy link
Member

Thanks @sah0725

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: check_array_indexer also accepts an int or a slice
2 participants