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

Function test_cumulative_multiple_columns

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

Source from the content-addressed store, hash-verified

4485
4486
4487def test_cumulative_multiple_columns():
4488 # GH 3037
4489 df = pd.DataFrame(np.random.randn(100, 5), columns=list("abcde"))
4490 ddf = dd.from_pandas(df, 5)
4491
4492 for d in [ddf, df]:
4493 for c in df.columns:
4494 d[f"{c}cs"] = d[c].cumsum()
4495 d[f"{c}cmin"] = d[c].cummin()
4496 d[f"{c}cmax"] = d[c].cummax()
4497 d[f"{c}cp"] = d[c].cumprod()
4498
4499 assert_eq(ddf, df)
4500
4501
4502@pytest.mark.parametrize("func", [np.asarray, M.to_records])

Callers

nothing calls this directly

Calls 5

assert_eqFunction · 0.90
cumsumMethod · 0.45
cumminMethod · 0.45
cummaxMethod · 0.45
cumprodMethod · 0.45

Tested by

no test coverage detected