Skip to content

BENCH: add DataFrame.reindex(columns=..) benchmark that selects existing columns #40247

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
Mar 5, 2021

Conversation

jorisvandenbossche
Copy link
Member

I noticed that the current df.reindex(columns=idx) benchmark uses an indexer with all-non-existing indices (it uses range(4000, 7000) as indexer, but there are only 1000 columns), so basically it is benchmarking to create empty (all-NaN) columns. Therefore added a case of reindexing with an indexer consisting of existing column labels.

For reindexing the rows, it's already using existing row labels.

@jorisvandenbossche jorisvandenbossche added the Benchmark Performance (ASV) benchmarks label Mar 5, 2021
@jreback jreback added this to the 1.3 milestone Mar 5, 2021
@jreback jreback merged commit 0cae716 into pandas-dev:master Mar 5, 2021
@jreback
Copy link
Contributor

jreback commented Mar 5, 2021

cool

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Benchmark Performance (ASV) benchmarks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants