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

Function test_value_counts

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

Source from the content-addressed store, hash-verified

1174
1175
1176def test_value_counts():
1177 df = pd.DataFrame({"x": [1, 2, 1, 3, 3, 1, 4]})
1178 ddf = dd.from_pandas(df, npartitions=3)
1179 result = ddf.x.value_counts()
1180 expected = df.x.value_counts()
1181 assert_eq(result, expected)
1182 result2 = ddf.x.value_counts(split_every=2)
1183 assert_eq(result2, expected)
1184 assert result._name != result2._name
1185
1186
1187def test_value_counts_not_sorted():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
value_countsMethod · 0.45

Tested by

no test coverage detected