Skip to content

BUG: Unstack/pivot raising ValueError on large result #45084

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
Dec 28, 2021

Conversation

mroeschke
Copy link
Member

@mroeschke mroeschke added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Dec 28, 2021
msg = "Unstacked DataFrame is too big, causing int32 overflow"
with pytest.raises(ValueError, match=msg):
msg = "The following operation may generate"
with tm.assert_produces_warning(PerformanceWarning, match=msg):
Copy link
Contributor

Choose a reason for hiding this comment

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

does this test actually run?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yup. These are running on the slow builds.

6.56s call     pandas/tests/frame/test_stack_unstack.py::TestStackUnstackMultiLevel::test_unstack_number_of_levels_larger_than_int32
6.50s call     pandas/tests/reshape/test_pivot.py::TestPivotTable::test_pivot_number_of_levels_larger_than_int32

@mroeschke mroeschke added this to the 1.4 milestone Dec 28, 2021
@jreback jreback merged commit 7b7b025 into pandas-dev:master Dec 28, 2021
@jreback
Copy link
Contributor

jreback commented Dec 28, 2021

thanks @mroeschke

@mroeschke mroeschke deleted the ref/unstack_overflow branch December 28, 2021 18:02
@simonjayhawkins
Copy link
Member

@mroeschke this seems to significantly increase the run time running the tests locally.

also the tests fail with pytest-xdist... node down.

@mroeschke
Copy link
Member Author

@mroeschke this seems to significantly increase the run time running the tests locally.

also the tests fail with pytest-xdist... node down.

Addressed in #45112. Now takes ~4 seconds locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pivot / unstack on large data frame does not work int32 overflow
3 participants