MCPcopy Create free account
hub / github.com/dask/dask / test_merge_outer_empty

Function test_merge_outer_empty

dask/dataframe/tests/test_multi.py:2098–2113  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2096
2097
2098def test_merge_outer_empty():
2099 # Issue #5470 bug reproducer
2100 k_clusters = 3
2101 df = pd.DataFrame(
2102 {"user": ["A", "B", "C", "D", "E", "F"], "cluster": [1, 1, 2, 2, 3, 3]}
2103 )
2104 df = dd.from_pandas(df, npartitions=10)
2105 empty_df = dd.from_pandas(pd.DataFrame(), npartitions=10)
2106
2107 for x in range(0, k_clusters + 1):
2108 assert_eq(
2109 dd.merge(empty_df, df[df.cluster == x], how="outer"),
2110 df[df.cluster == x],
2111 check_index=False,
2112 check_divisions=False,
2113 )
2114
2115
2116def test_dtype_equality_warning():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
mergeMethod · 0.45

Tested by

no test coverage detected