tabsdata.tableframe.expr.string.ExprStringNameSpace.len_chars#
- ExprStringNameSpace.len_chars() Expr [source]#
Return number of chars (not bytes) of a string.
Example:
>>> import tabsdata as td >>> >>> tf: td.TableFrame ... >>> >>> tf.select(td.col("a"), td.col("a").str.len_chars().alias("len_chars")) >>> ┌──────┬────────────┐ │ a ┆ to_decimal │ │ --- ┆ --- │ │ str ┆ u32 │ ╞══════╪════════════╡ │ ab ┆ 2 │ │ 再 ┆ 3 │ │ null ┆ null │ └──────┴────────────┘