From a8fb9a2159a0072280e53b9f5726f8d36b7793ba Mon Sep 17 00:00:00 2001 From: Alessandro Miola <37796412+AlessandroMiola@users.noreply.github.com> Date: Mon, 9 Dec 2024 11:02:42 +0100 Subject: [PATCH] chore: avoid unnecessary branching on pl version in pln.mean (#1543) --- narwhals/_polars/namespace.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/narwhals/_polars/namespace.py b/narwhals/_polars/namespace.py index 2363e2895..7903de15b 100644 --- a/narwhals/_polars/namespace.py +++ b/narwhals/_polars/namespace.py @@ -132,14 +132,8 @@ def mean(self: Self, *column_names: str) -> PolarsExpr: from narwhals._polars.expr import PolarsExpr - if self._backend_version < (0, 20, 4): - return PolarsExpr( - pl.mean([*column_names]), # type: ignore[arg-type] - version=self._version, - backend_version=self._backend_version, - ) return PolarsExpr( - pl.mean(*column_names), + pl.mean([*column_names]), # type: ignore[arg-type] version=self._version, backend_version=self._backend_version, )