Skip to content

Commit 2c4440c

Browse files
committed
pull from main
1 parent e6122c6 commit 2c4440c

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

pandas/tests/copy_view/test_methods.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -216,18 +216,3 @@ def test_chained_methods(request, method, idx, using_copy_on_write):
216216
tm.assert_frame_equal(df2.iloc[:, idx:], df_orig)
217217

218218

219-
def test_set_axis(using_copy_on_write):
220-
# GH 49473
221-
df = DataFrame({"a": [1, 2, 3], "b": [4, 5, 6], "c": [0.1, 0.2, 0.3]})
222-
df_orig = df.copy()
223-
df2 = df.set_axis(["a", "b", "c"], axis="index")
224-
225-
if using_copy_on_write:
226-
assert np.shares_memory(get_array(df2, "a"), get_array(df, "a"))
227-
else:
228-
assert not np.shares_memory(get_array(df2, "a"), get_array(df, "a"))
229-
230-
# mutating df2 triggers a copy-on-write for that column / block
231-
df2.iloc[0, 1] = 0
232-
assert not np.shares_memory(get_array(df2, "b"), get_array(df, "b"))
233-
tm.assert_frame_equal(df, df_orig)

0 commit comments

Comments
 (0)