| 2930 | @pytest.mark.skipif(not PANDAS_GE_210, reason="Not available before") |
| 2931 | @pytest.mark.parametrize("na_action", [None, "ignore"]) |
| 2932 | def 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") |