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

Function test_cumulative_multiple_columns

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

Source from the content-addressed store, hash-verified

4472
4473
4474def test_cumulative_multiple_columns():
4475 # GH 3037
4476 df = pd.DataFrame(np.random.randn(100, 5), columns=list("abcde"))
4477 ddf = dd.from_pandas(df, 5)
4478
4479 for d in [ddf, df]:
4480 for c in df.columns:
4481 d[c + "cs"] = d[c].cumsum()
4482 d[c + "cmin"] = d[c].cummin()
4483 d[c + "cmax"] = d[c].cummax()
4484 d[c + "cp"] = d[c].cumprod()
4485
4486 assert_eq(ddf, df)
4487
4488
4489@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