Skip to content

WIP: avoid zip and unzip to improve the speed of get_indexer #41177

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
wants to merge 1 commit into from

Conversation

qiuwei
Copy link

@qiuwei qiuwei commented Apr 27, 2021

@qiuwei qiuwei changed the title avoid zip and unzip to improve the speed of get_index WIP: avoid zip and unzip to improve the speed of get_index Apr 27, 2021
@qiuwei qiuwei force-pushed the faster_get_index branch from 5dba928 to 5a9f898 Compare April 27, 2021 15:52
@qiuwei qiuwei changed the title WIP: avoid zip and unzip to improve the speed of get_index WIP: avoid zip and unzip to improve the speed of get_indexer Apr 27, 2021
vals = cast("CategoricalIndex", vals)
vals = vals._data._internal_get_values()
if isinstance(vals.dtype, ExtensionDtype):
vals = vals.astype(object)
Copy link
Member

Choose a reason for hiding this comment

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

for e.g. dt64tz wouldnt we want to just use dt64?

@@ -2666,6 +2684,15 @@ def _get_partial_string_timestamp_match_key(self, key):

return key

def _get_engine_target(self) -> np.ndarray:
Copy link
Member

Choose a reason for hiding this comment

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

annotation is inaccurate?

@datapythonista
Copy link
Member

@qiuwei is this something you want to continue working on?

@qiuwei
Copy link
Author

qiuwei commented May 14, 2021

@qiuwei is this something you want to continue working on?

@datapythonista I realize there are a lot of implementations depending on the current get_indexer interface.
Changing this requires too much work for me at the moment.

Close for now.

@qiuwei qiuwei closed this May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PERF: regression in reindex. Pandas 0.23.4 is 60x slower than 0.22.0 with a MultiIndex with datetime64
3 participants