()
| 4472 | |
| 4473 | |
| 4474 | def 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]) |