MCPcopy Index your code
hub / github.com/dask/dask / test_drop_columns

Function test_drop_columns

dask/dataframe/tests/test_dataframe.py:2716–2730  ·  view source on GitHub ↗
(columns)

Source from the content-addressed store, hash-verified

2714
2715@pytest.mark.parametrize("columns", [["b"], []])
2716def test_drop_columns(columns):
2717 # Check both populated and empty list argument
2718 # https://github.com/dask/dask/issues/6870
2719
2720 df = pd.DataFrame(
2721 {
2722 "a": [2, 4, 6, 8],
2723 "b": ["1a", "2b", "3c", "4d"],
2724 }
2725 )
2726 ddf = dd.from_pandas(df, npartitions=2)
2727 ddf2 = ddf.drop(columns=columns)
2728 ddf["new"] = ddf["a"] + 1 # Check that ddf2 is not modified
2729
2730 assert_eq(df.drop(columns=columns), ddf2)
2731
2732
2733def test_gh580():

Callers

nothing calls this directly

Calls 2

dropMethod · 0.95
assert_eqFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…