polars.map#

polars.map(exprs: Union[Sequence[str], Sequence[Expr]], f: Callable[[Sequence[Series]], Series], return_dtype: type[DataType] | None = None) Expr[source]#

Map a custom function over multiple columns/expressions.

Produces a single Series result.

Parameters:
exprs

Input Series to f

f

Function to apply over the input

return_dtype

dtype of the output Series

Returns:
Expr