Skip to content

REF: Move Series logic from Index._get_values_for_loc #47975

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
Oct 24, 2022

Conversation

jbrockmendel
Copy link
Member

Cleaner abstraction.

@mroeschke mroeschke added the Refactor Internal refactoring of code label Aug 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 8, 2022

This pull request is stale because it has been open for thirty days with no activity. Please update and respond to this comment if you're still interested in working on this.

@github-actions github-actions bot added the Stale label Sep 8, 2022
@jbrockmendel jbrockmendel force-pushed the ref-get_values_for_loc branch from a925651 to 0af361b Compare October 20, 2022 17:20
@@ -1062,7 +1063,24 @@ def _get_value(self, label, takeable: bool = False):

# Similar to Index.get_value, but we do not fall back to positional
loc = self.index.get_loc(label)
return self.index._get_values_for_loc(self, loc, label)

if is_integer(loc):
Copy link
Member

Choose a reason for hiding this comment

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

So since this PR has been opened code is no longer moved from Index._get_values_for_loc?

Copy link
Member Author

Choose a reason for hiding this comment

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

get_values_for_loc can be removed after this. at the time this PR was opened there was another (deprecated) usage

@mroeschke mroeschke removed the Stale label Oct 24, 2022
@mroeschke mroeschke added this to the 2.0 milestone Oct 24, 2022
@mroeschke mroeschke merged commit dbe0c10 into pandas-dev:main Oct 24, 2022
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the ref-get_values_for_loc branch October 24, 2022 21:34
noatamir pushed a commit to noatamir/pandas that referenced this pull request Nov 9, 2022
* REF: Move Series logic from Index._get_values_for_loc

* try again
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants