tabsdata.tableframe.expr.expr.Expr.first#

Expr.first() Expr[source]#

Get the first element.

Example:

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("age"), td.col("age").first().alias("first"))
>>>
┌──────┬─────────┐
│ age  ┆ first   │
│ ---  ┆ ------- │
│ i64  ┆ i64     │
╞══════╪═════════╡
│ 10   ┆ 10      │
│ 11   ┆ 10      │
│ 18   ┆ 10      │
│ 65   ┆ 10      │
│ 70   ┆ 10      │
└──────┴─────────┘