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

Function test_replace

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

Source from the content-addressed store, hash-verified

4754
4755
4756def test_replace():
4757 df = pd.DataFrame({"x": [1, 2, 3, 4, 5]})
4758 ddf = dd.from_pandas(df, npartitions=2)
4759
4760 assert_eq(df.replace(1, 10), ddf.replace(1, 10))
4761 assert_eq(df.replace({1: 10, 2: 20}), ddf.replace({1: 10, 2: 20}))
4762 assert_eq(df.x.replace(1, 10), ddf.x.replace(1, 10))
4763 assert_eq(df.x.replace({1: 10, 2: 20}), ddf.x.replace({1: 10, 2: 20}))
4764
4765
4766@pytest.mark.xfail(reason="we can't do this yet")

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
replaceMethod · 0.45

Tested by

no test coverage detected