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