Skip to content

Commit 39a9aa2

Browse files
committed
wip
1 parent 7fd2f34 commit 39a9aa2

File tree

2 files changed

+0
-56
lines changed

2 files changed

+0
-56
lines changed

pandas/tests/copy_view/test_methods.py

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,28 +1105,6 @@ def test_putmask_aligns_rhs_no_reference(dtype):
11051105
assert np.shares_memory(arr_a, get_array(df, "a"))
11061106

11071107

1108-
@pytest.mark.parametrize(
1109-
"val, exp, warn", [(5.5, True, FutureWarning), (5, False, None)]
1110-
)
1111-
def test_putmask_dont_copy_some_blocks(val, exp, warn):
1112-
df = DataFrame({"a": [1, 2], "b": 1, "c": 1.5})
1113-
view = df[:]
1114-
df_orig = df.copy()
1115-
indexer = DataFrame(
1116-
[[True, False, False], [True, False, False]], columns=list("abc")
1117-
)
1118-
with tm.assert_produces_warning(warn, match="incompatible dtype"):
1119-
df[indexer] = val
1120-
1121-
assert not np.shares_memory(get_array(view, "a"), get_array(df, "a"))
1122-
# TODO(CoW): Could split blocks to avoid copying the whole block
1123-
assert np.shares_memory(get_array(view, "b"), get_array(df, "b")) is exp
1124-
assert np.shares_memory(get_array(view, "c"), get_array(df, "c"))
1125-
assert df._mgr._has_no_reference(1) is not exp
1126-
assert not df._mgr._has_no_reference(2)
1127-
tm.assert_frame_equal(view, df_orig)
1128-
1129-
11301108
@pytest.mark.parametrize("dtype", ["int64", "Int64"])
11311109
@pytest.mark.parametrize(
11321110
"func",

pandas/tests/frame/indexing/test_coercion.py

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -46,40 +46,6 @@ def test_loc_setitem_multiindex_columns(self, consolidate):
4646
# TODO: i think this isn't about MultiIndex and could be done with iloc?
4747

4848

49-
def test_37477():
50-
# fixed by GH#45121
51-
orig = DataFrame({"A": [1, 2, 3], "B": [3, 4, 5]})
52-
expected = DataFrame({"A": [1, 2, 3], "B": [3, 1.2, 5]})
53-
54-
df = orig.copy()
55-
with tm.assert_produces_warning(
56-
FutureWarning, match="Setting an item of incompatible dtype"
57-
):
58-
df.at[1, "B"] = 1.2
59-
tm.assert_frame_equal(df, expected)
60-
61-
df = orig.copy()
62-
with tm.assert_produces_warning(
63-
FutureWarning, match="Setting an item of incompatible dtype"
64-
):
65-
df.loc[1, "B"] = 1.2
66-
tm.assert_frame_equal(df, expected)
67-
68-
df = orig.copy()
69-
with tm.assert_produces_warning(
70-
FutureWarning, match="Setting an item of incompatible dtype"
71-
):
72-
df.iat[1, 1] = 1.2
73-
tm.assert_frame_equal(df, expected)
74-
75-
df = orig.copy()
76-
with tm.assert_produces_warning(
77-
FutureWarning, match="Setting an item of incompatible dtype"
78-
):
79-
df.iloc[1, 1] = 1.2
80-
tm.assert_frame_equal(df, expected)
81-
82-
8349
def test_6942(indexer_al):
8450
# check that the .at __setitem__ after setting "Live" actually sets the data
8551
start = Timestamp("2014-04-01")

0 commit comments

Comments
 (0)