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

Function test_unknown_divisions

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

Source from the content-addressed store, hash-verified

1686
1687
1688def test_unknown_divisions():
1689 dsk = {
1690 ("x", 0): pd.DataFrame({"a": [1, 2, 3], "b": [4, 5, 6]}),
1691 ("x", 1): pd.DataFrame({"a": [4, 5, 6], "b": [3, 2, 1]}),
1692 ("x", 2): pd.DataFrame({"a": [7, 8, 9], "b": [0, 0, 0]}),
1693 }
1694 d = dd.repartition(
1695 pd.concat(dsk.values()), divisions=[0, 1, 2, 10]
1696 ).clear_divisions()
1697 full = d.compute(scheduler="sync")
1698
1699 assert_eq(d.a.sum(), full.a.sum())
1700 assert_eq(d.a + d.b + 1, full.a + full.b + 1)
1701
1702
1703def test_with_min_count():

Callers

nothing calls this directly

Calls 6

assert_eqFunction · 0.90
clear_divisionsMethod · 0.45
repartitionMethod · 0.45
valuesMethod · 0.45
computeMethod · 0.45
sumMethod · 0.45

Tested by

no test coverage detected