()
| 4485 | |
| 4486 | |
| 4487 | def 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]) |