modin.pandas.Series.str.capitalize¶
- Series.str.capitalize()[source] (https://github.com/snowflakedb/snowpark-python/blob/v1.26.0/snowpark-python/.tox/docs/lib/python3.9/site-packages/modin/pandas/series_utils.py#L514-L515)¶
Convert strings in the Series/Index to be capitalized.
- Return type:
Series or Index of object
See also
Series.str.lower
Converts all characters to lowercase.
Series.str.upper
Converts all characters to uppercase.
Series.str.title
Converts first character of each word to uppercase and remaining to lowercase.
Series.str.capitalize
Converts first character to uppercase and remaining to lowercase.
Series.str.swapcase
Converts uppercase to lowercase and lowercase to uppercase.
Series.str.casefold
Removes all case distinctions in the string.
Examples
>>> s = pd.Series(['lower', 'CAPITALS', 'this is a sentence', 'SwApCaSe']) >>> s 0 lower 1 CAPITALS 2 this is a sentence 3 SwApCaSe dtype: object
>>> s.str.capitalize() 0 Lower 1 Capitals 2 This is a sentence 3 Swapcase dtype: object