Expr.str.tail
methodView source ↗
def tail(n: int | td_IntoExprColumn) -> Expr
Categories: string
Extract the end of the string up to the given length.
Parameters
parameter
nThe 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 │
│ --- ┆ --- │
│ str ┆ str │
╞══════╪══════╡
│ abc ┆ bc │
│ a ┆ a │
│ null ┆ null │
└──────┴──────┘