MCPcopy
hub / github.com/dask/dask / test_common_aggs

Function test_common_aggs

dask/dataframe/tseries/tests/test_resample.py:217–227  ·  view source on GitHub ↗
(agg)

Source from the content-addressed store, hash-verified

215
216@pytest.mark.parametrize("agg", ["nunique", "mean", "count", "size", "quantile"])
217def test_common_aggs(agg):
218 index = pd.date_range("2000-01-01", "2000-02-15", freq="h")
219 ps = pd.Series(range(len(index)), index=index)
220 ds = dd.from_pandas(ps, npartitions=2)
221
222 f = lambda df: getattr(df, agg)()
223
224 res = f(ps.resample("1D"))
225 expected = f(ds.resample("1D"))
226
227 assert_eq(res, expected, check_dtype=False)
228
229
230def test_rule_deprecated():

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
resampleMethod · 0.80
fFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…