diff --git a/narwhals/_dask/expr.py b/narwhals/_dask/expr.py index c111b5153..941f0e7a4 100644 --- a/narwhals/_dask/expr.py +++ b/narwhals/_dask/expr.py @@ -485,6 +485,13 @@ def clip( returns_scalar=False, ) + def diff(self: Self) -> Self: + return self._from_call( + lambda _input: _input.diff(), + "diff", + returns_scalar=False, + ) + def n_unique(self: Self) -> Self: return self._from_call( lambda _input: _input.nunique(dropna=False), diff --git a/tests/expr_and_series/diff_test.py b/tests/expr_and_series/diff_test.py index 41f59c34d..f38b96e00 100644 --- a/tests/expr_and_series/diff_test.py +++ b/tests/expr_and_series/diff_test.py @@ -15,8 +15,6 @@ def test_diff(constructor: Any, request: Any) -> None: - if "dask" in str(constructor): - request.applymarker(pytest.mark.xfail) if "pyarrow_table_constructor" in str(constructor) and parse_version( pa.__version__ ) < (13,):