Skip to main content
Version: 1.3.0

Expr.str.tail

def tail(n: int | td_IntoExprColumn) -> Expr

Categories: string

Extract the end of the string up to the given length.

Parameters

parameter
n

The length of the tail.

Examples

>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("a"), td.col("a").str.tail(2).alias("tail"))
>>>
┌──────┬──────┐
│ a ┆ tail │
------
strstr
╞══════╪══════╡
│ abc ┆ bc │
│ a ┆ a │
│ null ┆ null │
└──────┴──────┘