xarray.DataArray.str.rstrip

DataArray.str.rstrip(to_strip=None)

Remove leading and trailing characters.

Strip whitespaces (including newlines) or a set of specified characters from each string in the array from the right side.

Parameters

to_strip (str or None, default None) – Specifying the set of characters to be removed. All combinations of this set of characters will be stripped. If None then whitespaces are removed.

Returns

stripped

Return type

same type as values