cudf.core.column.string.StringMethods.upper#

StringMethods.upper() SeriesOrIndex#

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

lower

Converts all characters to lowercase.

upper

Converts all characters to uppercase.

title

Converts first character of each word to uppercase and remaining to lowercase.

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.upper()
0                 LOWER
1              CAPITALS
2    THIS IS A SENTENCE
3              SWAPCASE
dtype: object