MCPcopy
hub / github.com/pandas-dev/pandas / test_frame_loc

Function test_frame_loc

pandas/tests/test_col.py:140–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138
139
140def test_frame_loc() -> None:
141 # https://github.com/pandas-dev/pandas/pull/63439
142 df = pd.DataFrame({"a": [1, 2], "b": [3, 4]})
143 expr = pd.col("a") == 2
144 result = df.copy()
145 result.loc[expr, "b"] = 100
146 expected = pd.DataFrame({"a": [1, 2], "b": [3, 100]})
147 tm.assert_frame_equal(result, expected)
148
149
150def test_frame_iloc() -> None:

Callers

nothing calls this directly

Calls 2

colMethod · 0.80
copyMethod · 0.45

Tested by

no test coverage detected