cudf.core.accessors.string.StringMethods.title#
- StringMethods.title() Series | Index[source]#
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
lowerConverts all characters to lowercase.
upperConverts all characters to uppercase.
capitalizeConverts first character to uppercase and remaining to lowercase.
swapcaseConverts 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