Expr.str.len_bytes
methodView source ↗
def len_bytes() -> Expr
Categories: string
Return number of bytes (not chars) of a string.
Examples
>>> import tabsdata as td
>>>
>>> tf: td.TableFrame ...
>>>
>>> tf.select(td.col("a"), td.col("a").str.len_bytes().alias("len_bytes"))
>>>
┌──────┬────────────┐
│ a ┆ to_decimal │
│ --- ┆ --- │
│ str ┆ u32 │
╞══════╪════════════╡
│ ab ┆ 2 │
│ 再 ┆ 3 │
│ null ┆ null │
└──────┴────────────┘