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

Function test_case_when

dask/dataframe/dask_expr/tests/test_collection.py:1117–1120  ·  view source on GitHub ↗
(pdf, df)

Source from the content-addressed store, hash-verified

1115
1116@pytest.mark.skipif(not PANDAS_GE_220, reason="not implemented")
1117def test_case_when(pdf, df):
1118 result = df.x.case_when([(df.x.eq(1), 1), (df.y == 10, 2.5)])
1119 expected = pdf.x.case_when([(pdf.x.eq(1), 1), (pdf.y == 10, 2.5)])
1120 assert_eq(result, expected)
1121
1122
1123def test_head_head(df):

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
case_whenMethod · 0.80
eqMethod · 0.45

Tested by

no test coverage detected