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

Function test_case_when

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

Source from the content-addressed store, hash-verified

1169
1170@pytest.mark.skipif(not PANDAS_GE_220, reason="not implemented")
1171def test_case_when(pdf, df):
1172 result = df.x.case_when([(df.x.eq(1), 1), (df.y == 10, 2.5)])
1173 expected = pdf.x.case_when([(pdf.x.eq(1), 1), (pdf.y == 10, 2.5)])
1174 assert_eq(result, expected)
1175
1176
1177def 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