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

Function test_dataframe_map

dask/dataframe/tests/test_dataframe.py:2932–2940  ·  view source on GitHub ↗
(na_action)

Source from the content-addressed store, hash-verified

2930@pytest.mark.skipif(not PANDAS_GE_210, reason="Not available before")
2931@pytest.mark.parametrize("na_action", [None, "ignore"])
2932def test_dataframe_map(na_action):
2933 df = pd.DataFrame({"x": [1, 2, 3, np.nan], "y": [10, 20, 30, 40]})
2934 ddf = dd.from_pandas(df, npartitions=2)
2935 with pytest.warns(UserWarning, match="meta"):
2936 assert_eq(
2937 ddf.map(lambda x: x + 1, na_action=na_action),
2938 df.map(lambda x: x + 1, na_action=na_action),
2939 )
2940 assert_eq(ddf.map(lambda x: (x, x)), df.map(lambda x: (x, x)))
2941
2942
2943@pytest.mark.skipif(PANDAS_GE_210, reason="Available at 2.1")

Callers

nothing calls this directly

Calls 3

mapMethod · 0.95
assert_eqFunction · 0.90
mapMethod · 0.45

Tested by

no test coverage detected