Skip to main content
Version: 1.9.0

Expr.last

def last() -> Expr

Categories: aggregation

Get the last element.

Examples

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf = tf.select(td.col("age"), td.col("age").first().alias("last"))
>>>
┌──────┬─────────┐
│ age ┆ last │
----------
│ i64 ┆ i64 │
╞══════╪═════════╡
1070
1170
1870
6570
7070
└──────┴─────────┘