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

Function test_groupby_index_array

dask/dataframe/tests/test_groupby.py:472–488  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

470
471
472def test_groupby_index_array():
473 df = _compat.makeTimeDataFrame()
474 ddf = dd.from_pandas(df, npartitions=2)
475
476 # first select column, then group
477 assert_eq(
478 df.A.groupby(df.index.month).nunique(),
479 ddf.A.groupby(ddf.index.month).nunique(),
480 check_names=False,
481 )
482
483 # first group, then select column
484 assert_eq(
485 df.groupby(df.index.month).A.nunique(),
486 ddf.groupby(ddf.index.month).A.nunique(),
487 check_names=False,
488 )
489
490
491def test_groupby_set_index():

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
nuniqueMethod · 0.45
groupbyMethod · 0.45

Tested by

no test coverage detected