| 109 | @pytest.mark.skipif(not PANDAS_GE_210, reason="Not available before") |
| 110 | @pytest.mark.parametrize("na_action", [None, "ignore"]) |
| 111 | def test_dataframe_map(na_action): |
| 112 | df = pd.DataFrame({"x": [1, 2, 3, np.nan], "y": [10, 20, 30, 40]}) |
| 113 | ddf = dd.from_pandas(df, npartitions=2) |
| 114 | with pytest.warns(UserWarning, match="meta"): |
| 115 | assert_eq( |
| 116 | ddf.map(lambda x: x + 1, na_action=na_action), |
| 117 | df.map(lambda x: x + 1, na_action=na_action), |
| 118 | ) |
| 119 | assert_eq(ddf.map(lambda x: (x, x)), df.map(lambda x: (x, x))) |
| 120 | |
| 121 | |
| 122 | def test_series_meta_raises(): |