-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF: remove iloc case from _convert_slice_indexer #31786
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
Conversation
sure |
1 similar comment
sure |
if kind == "iloc": | ||
return super()._convert_slice_indexer(key, kind=kind) | ||
|
||
# We always treat __getitem__ slicing as label-based |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure this comment is correct? (eg for a series with Int64Index, slicing is positional?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this method is for Float64Index
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, missed that in the diff. Thanks!
_convert_slice_indexer is turning out to be one of the stickier methods to figure out, xref #31658.
The case with kind=None is only called from one place in core.indexing, and that is not reached in the tests. I'd like to either a) figure out a non-None kind to pass to it, or b) determine that it can never be reached so can be removed. Any thoughts on this are very welcome.