Skip to content

REF/BUG: Index.get_value called incorrectly, de-duplicate+simplify #31134

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 3 commits into from
Jan 20, 2020

Conversation

jbrockmendel
Copy link
Member

Also engine.get_value is being called incorrectly in DTI/TDI, which this fixes.

return self._get_values_for_loc(series, loc)

def _get_values_for_loc(self, series, loc):
"""
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add Paramters / Returns & typing as much as you can.

This likely duplicates some existing routines, no?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, it de-duplicates code that we have I think in two places in Index.get_value and one each in DTI and TDI.

That said, this is one of the things we'll be able to simplify if/when we do the _values thing mentioned in #31037.

Will annotate in next pass

@jreback jreback added the Indexing Related to indexing on series/frames, not to indexes themselves label Jan 19, 2020
@jreback jreback added this to the 1.1 milestone Jan 20, 2020
@jreback jreback merged commit 71b6833 into pandas-dev:master Jan 20, 2020
@jbrockmendel jbrockmendel deleted the ref-get_value3 branch January 20, 2020 16:24
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.

2 participants