Expr.first
methodView source ↗
def first() -> TdExpr
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 │
╞══════╪═════════╡
│ 10 ┆ 10 │
│ 11 ┆ 10 │
│ 18 ┆ 10 │
│ 65 ┆ 10 │
│ 70 ┆ 10 │
└──────┴─────────┘