cudf.core.column.string.StringMethods.normalize_spaces#
- StringMethods.normalize_spaces() SeriesOrIndex #
Remove extra whitespace between tokens and trim whitespace from the beginning and the end of each string.
- Returns
- Series or Index of object.
Examples
>>> import cudf >>> ser = cudf.Series(["hello \\t world"," test string "]) >>> ser.str.normalize_spaces() 0 hello world 1 test string dtype: object