polars.first

polars.first(column: str) polars.internals.expr.Expr
polars.first(column: polars.internals.series.Series) Any
polars.first(column: None = None) polars.internals.expr.Expr

Get the first value.

Depending on the input type this function does different things:

input:

  • None -> expression to take first column of a context.

  • str -> syntactic sugar for pl.col(..).first()

  • Series -> Take first value in Series