cudf.core.column.string.StringMethods.title#

StringMethods.title() SeriesOrIndex#

Uppercase the first letter of each letter after a space and lowercase the rest. This only applies to ASCII characters at this time.

Equivalent to str.title().

Returns
Series or Index of object

See also

lower

Converts all characters to lowercase.

upper

Converts all characters to uppercase.

capitalize

Converts first character to uppercase and remaining to lowercase.

swapcase

Converts uppercase to lowercase and lowercase to uppercase.

Examples

>>> import cudf
>>> data = ['lower', 'CAPITALS', 'this is a sentence', 'SwApCaSe'])
>>> s = cudf.Series(data)
>>> s
0                 lower
1              CAPITALS
2    this is a sentence
3              SwApCaSe
dtype: object
>>> s.str.title()
0                 Lower
1              Capitals
2    This Is A Sentence
3              Swapcase
dtype: object