Skip to content

PERF: Series.str.get_dummies for "string[pyarrow]" and "string[pyarrow_numpy]" dtypes #56110

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
Nov 22, 2023

Conversation

lukemanley
Copy link
Member

from asv_bench.benchmarks.strings import Dummies

dtype = "string[pyarrow]"
b = Dummies()
b.setup(dtype)

%timeit b.time_get_dummies(dtype)

# 845 ms ± 51.3 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)     -> main
# 85.5 ms ± 4.44 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)  -> PR

@lukemanley lukemanley added Performance Memory or execution speed performance Strings String extension data type and string data labels Nov 22, 2023
@lukemanley lukemanley added this to the 2.2 milestone Nov 22, 2023
@mroeschke mroeschke merged commit edbdf95 into pandas-dev:main Nov 22, 2023
@mroeschke
Copy link
Member

Thanks @lukemanley

@lukemanley lukemanley deleted the str-get-dummies branch November 22, 2023 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Performance Memory or execution speed performance Strings String extension data type and string data
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants