MCPcopy Create free account
hub / github.com/dask/dask / test_column_assignment

Function test_column_assignment

dask/dataframe/tests/test_dataframe.py:3608–3616  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3606
3607
3608def test_column_assignment():
3609 df = pd.DataFrame({"x": [1, 2, 3, 4], "y": [1, 0, 1, 0]})
3610 ddf = dd.from_pandas(df, npartitions=2)
3611 orig = ddf.copy()
3612 ddf["z"] = ddf.x + ddf.y
3613 df["z"] = df.x + df.y
3614
3615 assert_eq(df, ddf)
3616 assert "z" not in orig.columns
3617
3618
3619def test_array_assignment():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected