Skip to content

REGR: Performance of DataFrame.stack where columns are not a MultiIndex #58027

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 27, 2024

Conversation

rhshadrach
Copy link
Member

Thanks @DeaMariaLeon for identifying this regression and @jorisvandenbossche for the solution used here.

ASVs

| Change   | Before [e51039af] <enh_fillna_allow_none~1>   | After [664c54b8] <regr_perf_stack>   |   Ratio | Benchmark (Parameter)                                                  |
|----------|-----------------------------------------------|--------------------------------------|---------|------------------------------------------------------------------------|
| -        | 304±2ms                                       | 44.2±0.4ms                           |    0.15 | reshape.ReshapeExtensionDtype.time_stack('datetime64[ns, US/Pacific]') |
| -        | 304±2ms                                       | 43.7±0.2ms                           |    0.14 | reshape.ReshapeExtensionDtype.time_stack('Period[s]')                  |
| -        | 294±0.7ms                                     | 40.8±0.3ms                           |    0.14 | reshape.ReshapeMaskedArrayDtype.time_stack('Float64')                  |
| -        | 291±2ms                                       | 40.7±0.2ms                           |    0.14 | reshape.ReshapeMaskedArrayDtype.time_stack('Int64')                    |

@rhshadrach rhshadrach added Performance Memory or execution speed performance Reshaping Concat, Merge/Join, Stack/Unstack, Explode Regression Functionality that used to work in a prior pandas version labels Mar 27, 2024
@rhshadrach rhshadrach added this to the 3.0 milestone Mar 27, 2024
@mroeschke mroeschke merged commit 1f4c56b into pandas-dev:main Mar 27, 2024
52 checks passed
@mroeschke
Copy link
Member

Thanks @rhshadrach

@rhshadrach rhshadrach deleted the regr_perf_stack branch March 27, 2024 17:41
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
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 Regression Functionality that used to work in a prior pandas version Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants