Skip to content

Fix regression in .ix fallback with IntervalIndex #27926

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
merged 1 commit into from
Aug 19, 2019

Conversation

jorisvandenbossche
Copy link
Member

closes #27865

cc @jbrockmendel this is another one from limiting the catched exceptions in https://github.com/pandas-dev/pandas/pull/27223/files#diff-7489e290a23303c4db4f803011ecaf8eR121. But also this time it's again rather a bug in the code that raises this error.

For some reason, DataFrame._get_value for a DataFrame with an IntervalIndex raises an AttributeError. That's a bug in itself which should be solved (and probably is the cause of more bugs in other places where _get_value is used, eg in .at). But will open a separate issue for that.

@jorisvandenbossche
Copy link
Member Author

Opened #27927

@jreback
Copy link
Contributor

jreback commented Aug 15, 2019

really? we haven't patched .ix in many releases. And we are removing it.

@jreback jreback added the Indexing Related to indexing on series/frames, not to indexes themselves label Aug 15, 2019
@jbrockmendel
Copy link
Member

@jorisvandenbossche you work on windows right? can you reproduce the azure failure?

@jorisvandenbossche
Copy link
Member Author

No, sorry, no windows :) (linux)

@jorisvandenbossche
Copy link
Member Author

really? we haven't patched .ix in many releases. And we are removing it.

Then we maybe also shouldn't have tried to clean up the code .. ;)

Anyway, this is just for 0.25.1, in master afterwards we can remove it again (when removing ix).
If the idea is that people can upgrade to 0.25, see all the warnings to fix them, to then be able to upgrade to 1.0, then the their code needs to work to be able to do that.

@jbrockmendel
Copy link
Member

Do I understand correctly: there is a bug in IntervalTree and fixing that would make this fix unnecessary?

@TomAugspurger
Copy link
Contributor

Yep. But I think that catching AttributeError here is a bit more conservative for the backport.

@jorisvandenbossche
Copy link
Member Author

Yes, I opened #27927 for that (the bug appears in other places as well, but there it was already failing before, so not a regression)

@jorisvandenbossche
Copy link
Member Author

Any objections to merge this?

@TomAugspurger
Copy link
Contributor

I think we're good. I had to restart the CI earlier for a failed build from the flaky test.

@TomAugspurger TomAugspurger merged commit 325dd68 into pandas-dev:master Aug 19, 2019
EunSeop pushed a commit to EunSeop/pandas that referenced this pull request Aug 20, 2019
@jorisvandenbossche jorisvandenbossche deleted the GH27865 branch August 20, 2019 06:46
@jorisvandenbossche
Copy link
Member Author

@meeseeksdev backport to 0.25.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot use .ix in IntervaIndex('pandas._libs.interval.IntervalTree' object has no attribute 'get_value')
4 participants