()
| 2681 | |
| 2682 | |
| 2683 | def test_pipe(): |
| 2684 | df = pd.DataFrame({"x": range(50), "y": range(50, 100)}) |
| 2685 | ddf = dd.from_pandas(df, npartitions=4) |
| 2686 | |
| 2687 | def f(x, y, z=0): |
| 2688 | return x + y + z |
| 2689 | |
| 2690 | assert_eq(ddf.pipe(f, 1, z=2), f(ddf, 1, z=2)) |
| 2691 | assert_eq(ddf.x.pipe(f, 1, z=2), f(ddf.x, 1, z=2)) |
| 2692 | |
| 2693 | |
| 2694 | def test_gh_517(): |