Skip to content

IntervalIndex.get_indexer "method" options are not implemented but documentation implies they are #26506

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

Closed
lucianoviola opened this issue May 23, 2019 · 4 comments
Labels
Docs Indexing Related to indexing on series/frames, not to indexes themselves Interval Interval data type
Milestone

Comments

@lucianoviola
Copy link
Contributor

lucianoviola commented May 23, 2019

Problem description

IntervalIndex.get_indexer returns NotImplementedError if method is any of the ones shown in the docstring and documentation (except for 'method=None'). I understand that they are not implemented yet, but that is not clear from the docstring. It presents the 5 available options as if they are implemented.

Wouldn't it be better to remove method, if none of the options are available? Or at least make it more clear in the documentation.

Documentation: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.IntervalIndex.get_indexer.html

Exception is raised here:
https://github.com/pandas-dev/pandas/blob/master/pandas/core/indexes/interval.py#L811

@lucianoviola lucianoviola changed the title IntervalIndex.get_indexer "method" options are implemented but documentation implies it does IntervalIndex.get_indexer "method" options are not implemented but documentation implies they are May 23, 2019
@timgates42
Copy link
Contributor

I see the documentation has already been forked for the get_loc method of IntervalIndexer I'll apply the same pattern for the get_indexer call and send through a PR

@gfyoung gfyoung added Docs Indexing Related to indexing on series/frames, not to indexes themselves Interval Interval data type labels May 25, 2019
@lucianoviola
Copy link
Contributor Author

lucianoviola commented May 25, 2019

I'm not sure what is the pandas core team thinks its the best approach for this. It might be the case that nothing needs to be done. Else, I would like to work on the issue.

@timgates42
Copy link
Contributor

I can’t speak for the pandas core team but that was sort of my assumption - I put a quick fix in to the documentation that the method parameter options were not yet implemented and that if the pandas core team agree an implementation would come and remove the documentation change.

@jreback jreback added this to the 0.25.0 milestone May 30, 2019
@jreback
Copy link
Contributor

jreback commented May 30, 2019

closed by #26519

@jreback jreback closed this as completed May 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Indexing Related to indexing on series/frames, not to indexes themselves Interval Interval data type
Projects
None yet
Development

No branches or pull requests

4 participants