Skip to content

Commit

Permalink
chore: restore inadvertently removed func and apply suggestion to avo…
Browse files Browse the repository at this point in the history
…id branching
  • Loading branch information
AlessandroMiola committed Oct 30, 2024
1 parent 4b8da4c commit a7156fa
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions narwhals/_polars/namespace.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,13 @@ def mean_horizontal(self, *exprs: IntoPolarsExpr) -> PolarsExpr:
dtypes=self._dtypes,
)

def median(self, *column_names: str) -> PolarsExpr:
import polars as pl # ignore-banned-import()

from narwhals._polars.expr import PolarsExpr

return PolarsExpr(pl.median([*column_names]), dtypes=self._dtypes) # type: ignore[arg-type]

def concat_str(
self,
exprs: Iterable[IntoPolarsExpr],
Expand Down

0 comments on commit a7156fa

Please sign in to comment.