cudf.core.accessors.string.StringMethods.upper#
- StringMethods.upper() Series | Index[source]#
Convert each string to uppercase. This only applies to ASCII characters at this time.
Equivalent to str.upper().
- Returns:
- Series or Index of object
See also
lowerConverts all characters to lowercase.
upperConverts all characters to uppercase.
titleConverts first character of each word to uppercase and remaining to lowercase.
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.upper() 0 LOWER 1 CAPITALS 2 THIS IS A SENTENCE 3 SWAPCASE dtype: object