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

Function test_split_out_value_counts

dask/dataframe/tests/test_dataframe.py:4052–4059  ·  view source on GitHub ↗
(split_every)

Source from the content-addressed store, hash-verified

4050
4051@pytest.mark.parametrize("split_every", [None, 2])
4052def test_split_out_value_counts(split_every):
4053 df = pd.DataFrame({"x": [1, 2, 3] * 100})
4054 ddf = dd.from_pandas(df, npartitions=5)
4055
4056 assert ddf.x.value_counts(split_out=10, split_every=split_every).npartitions == 10
4057 assert_eq(
4058 ddf.x.value_counts(split_out=10, split_every=split_every), df.x.value_counts()
4059 )
4060
4061
4062def test_values():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
value_countsMethod · 0.45

Tested by

no test coverage detected