Expr.str.to_titlecase
methodView source ↗
def to_titlecase() -> Expr
Categories: string
Uppercase the first character and lowercase all the others ones of a string.
Examples
>>> 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 │
└──────┴───────────┘