Skip to content

REF: avoid calling engine for EA values #31258

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
Jan 23, 2020

Conversation

jbrockmendel
Copy link
Member

No description provided.

@jreback jreback added ExtensionArray Extending pandas with custom dtypes or arrays. Indexing Related to indexing on series/frames, not to indexes themselves labels Jan 23, 2020
@jreback jreback added this to the 1.1 milestone Jan 23, 2020
@@ -2892,14 +2892,17 @@ def _get_value(self, index, col, takeable: bool = False):
engine = self.index._engine

try:
return engine.get_value(series._values, index)
if isinstance(series._values, np.ndarray):
Copy link
Contributor

Choose a reason for hiding this comment

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

i understand why you are doing this (does it affect perf btw?)

but is not a great long term pattern. can you instead factor this to a function (which you can also use in Series)?

Copy link
Member Author

Choose a reason for hiding this comment

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

long-term this is going to be made unnecessary when Series._values is changed to match Index._values. At that point libindex.get_value_at and IndexEngine.get_value will become entirely unnecessary

Copy link
Contributor

Choose a reason for hiding this comment

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

k sounds like a plan!

@jreback jreback merged commit fff4f3f into pandas-dev:master Jan 23, 2020
@jbrockmendel jbrockmendel deleted the cln-engine-access branch January 23, 2020 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ExtensionArray Extending pandas with custom dtypes or arrays. 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