()
| 77 | |
| 78 | |
| 79 | def test_sequential_joins(): |
| 80 | # Pandas version of multiple inner joins |
| 81 | df1 = pd.DataFrame( |
| 82 | {"key": list(range(6)), "A": ["A0", "A1", "A2", "A3", "A4", "A5"]} |
| 83 | ) |
| 84 | df2 = pd.DataFrame({"key": list(range(4)), "B": ["B0", "B1", "B2", "B3"]}) |
| 85 | df3 = pd.DataFrame({"key": list(range(1, 5)), "C": ["C0", "C1", "C2", "C3"]}) |
| 86 | |
| 87 | join_pd = _pandas_join(df1, df2, ("_l", "_r"), how="inner") |
| 88 | multi_join_pd = _pandas_join(join_pd, df3, ("_l", "_r"), how="inner") |
| 89 | |
| 90 | # Dask version of multiple inner joins |
| 91 | ddf1 = dd.from_pandas(df1, npartitions=3) |
| 92 | ddf2 = dd.from_pandas(df2, npartitions=2) |
| 93 | ddf3 = dd.from_pandas(df3, npartitions=2) |
| 94 | |
| 95 | join_dd = ddf1.join(ddf2, how="inner", lsuffix="_l", rsuffix="_r") |
| 96 | multi_join_dd = join_dd.join(ddf3, how="inner", lsuffix="_l", rsuffix="_r") |
| 97 | assert_eq(multi_join_pd, multi_join_dd) |
| 98 | |
| 99 | |
| 100 | def test_merge_asof_indexed(): |
nothing calls this directly
no test coverage detected