()
| 4497 | |
| 4498 | |
| 4499 | def test_cumulative_multiple_columns(): |
| 4500 | # GH 3037 |
| 4501 | df = pd.DataFrame(np.random.randn(100, 5), columns=list("abcde")) |
| 4502 | ddf = dd.from_pandas(df, 5) |
| 4503 | |
| 4504 | for d in [ddf, df]: |
| 4505 | for c in df.columns: |
| 4506 | d[f"{c}cs"] = d[c].cumsum() |
| 4507 | d[f"{c}cmin"] = d[c].cummin() |
| 4508 | d[f"{c}cmax"] = d[c].cummax() |
| 4509 | d[f"{c}cp"] = d[c].cumprod() |
| 4510 | |
| 4511 | assert_eq(ddf, df) |
| 4512 | |
| 4513 | |
| 4514 | @pytest.mark.parametrize("func", [np.asarray, M.to_records]) |