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

Function test_nunique

dask/dataframe/tests/test_dataframe.py:4825–4833  ·  view source on GitHub ↗
(dropna, axis)

Source from the content-addressed store, hash-verified

4823@pytest.mark.parametrize("dropna", [True, False])
4824@pytest.mark.parametrize("axis", [0, 1])
4825def test_nunique(dropna, axis):
4826 df = pd.DataFrame(
4827 {"x": ["a", "a", "c"], "y": [None, 1, 2], "c": np.arange(0, 1, 0.4)}
4828 )
4829 ddf = dd.from_pandas(df, npartitions=2)
4830 assert_eq(ddf["y"].nunique(dropna=dropna), df["y"].nunique(dropna=dropna))
4831 assert_eq(
4832 ddf.nunique(dropna=dropna, axis=axis), df.nunique(dropna=dropna, axis=axis)
4833 )
4834
4835
4836def test_iter():

Callers

nothing calls this directly

Calls 4

nuniqueMethod · 0.95
assert_eqFunction · 0.90
arangeMethod · 0.45
nuniqueMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…