Skip to content

CLN/PERF: .get_loc on float with integer coercion #12371

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
jreback opened this issue Feb 17, 2016 · 1 comment
Closed

CLN/PERF: .get_loc on float with integer coercion #12371

jreback opened this issue Feb 17, 2016 · 1 comment
Labels
Clean Index Related to the Index class or subclasses

Comments

@jreback
Copy link
Contributor

jreback commented Feb 17, 2016

xref: #12370

This should be done inside index.pyx

if the lookup fails and if its a non-float index, then coerce to int, and if its the same
lookup again.

@jreback jreback added Indexing Related to indexing on series/frames, not to indexes themselves Difficulty Intermediate Clean labels Feb 17, 2016
@jreback jreback modified the milestones: Next Major Release, 0.18.1 Feb 17, 2016
@jreback jreback modified the milestones: 0.18.2, 0.18.1 Apr 18, 2016
@jorisvandenbossche jorisvandenbossche modified the milestones: Next Major Release, 0.19.0 Aug 21, 2016
@toobaz toobaz added Index Related to the Index class or subclasses and removed Indexing Related to indexing on series/frames, not to indexes themselves labels Jun 28, 2019
@toobaz
Copy link
Member

toobaz commented Jun 28, 2019

I think this is fixed:

In [2]: idx = pd.Index([1, 2, 3])                                                                                                                             

In [3]: idx.get_loc(2.)                                                                                                                                       
Out[3]: 1

@toobaz toobaz closed this as completed Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Index Related to the Index class or subclasses
Projects
None yet
Development

No branches or pull requests

3 participants