Skip to content

Commit

Permalink
Revert test removal
Browse files Browse the repository at this point in the history
  • Loading branch information
rhshadrach committed May 21, 2024
1 parent 091b6e1 commit 436fc8f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pandas/tests/reshape/test_pivot.py
Original file line number Diff line number Diff line change
Expand Up @@ -2703,3 +2703,15 @@ def test_pivot_table_with_margins_and_numeric_column_names(self):
index=Index(["a", "b", "All"], name=0),
)
tm.assert_frame_equal(result, expected)

@pytest.mark.parametrize("m", [1, 10])
def test_unstack_copy(self, m):
# GH#56633
levels = np.arange(m)
index = MultiIndex.from_product([levels] * 2)
values = np.arange(m * m * 100).reshape(m * m, 100)
df = DataFrame(values, index, np.arange(100))
df_orig = df.copy()
result = df.unstack(sort=False)
result.iloc[0, 0] = -1
tm.assert_frame_equal(df, df_orig)

0 comments on commit 436fc8f

Please sign in to comment.