polars.Series.str.to_titlecase#

Series.str.to_titlecase() Series[source]#

Modify the strings to their titlecase equivalent.

Examples

>>> s = pl.Series("sing", ["welcome to my world", "THERE'S NO TURNING BACK"])
>>> s.str.to_titlecase()
shape: (2,)
Series: 'sing' [str]
[
    "Welcome To My …
    "There's No Tur…
]