tabsdata.tableframe.expr.string.ExprStringNameSpace.to_titlecase#
- ExprStringNameSpace.to_titlecase() Expr [source]#
Uppercase the first character and lowercase all the others ones of a string.
Example:
>>> import tabsdata as td >>> >>> tf: td.TableFrame ... >>> >>> tf.select(td.col("a"), td.col("a").str.to_titlecase().alias("titlecase")) >>> ┌──────┬───────────┐ │ a ┆ titlecase │ │ --- ┆ --- │ │ str ┆ str │ ╞══════╪═══════════╡ │ ab ┆ Ab │ │ Ab ┆ Ab │ │ AB ┆ Ab │ │ aB ┆ Ab │ │ null ┆ null │ └──────┴───────────┘