()
| 1317 | |
| 1318 | |
| 1319 | def test_isetitem_frame(): |
| 1320 | df = DataFrame({"a": [1, 2, 3], "b": 1, "c": 2}) |
| 1321 | rhs = DataFrame({"a": [4, 5, 6], "b": 2}) |
| 1322 | df.isetitem([0, 1], rhs) |
| 1323 | assert np.shares_memory(get_array(df, "a"), get_array(rhs, "a")) |
| 1324 | assert np.shares_memory(get_array(df, "b"), get_array(rhs, "b")) |
| 1325 | assert not df._mgr._has_no_reference(0) |
| 1326 | expected = df.copy() |
| 1327 | rhs.iloc[0, 0] = 100 |
| 1328 | rhs.iloc[0, 1] = 100 |
| 1329 | tm.assert_frame_equal(df, expected) |
| 1330 | |
| 1331 | |
| 1332 | @pytest.mark.parametrize("key", ["a", ["a"]]) |
nothing calls this directly
no test coverage detected