Skip to main content
Version: 1.2.0

Expr.first

def first() -> Expr

Categories: aggregation

Get the first element.

Examples

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("age"), td.col("age").first().alias("first"))
>>>
┌──────┬─────────┐
│ age ┆ first │
----------
│ i64 ┆ i64 │
╞══════╪═════════╡
1010
1110
1810
6510
7010
└──────┴─────────┘