DataArray.str.strip(to_strip=None, side='both')

Remove leading and trailing characters.

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

  • 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.

  • side ({"left", "right", "both"}, default: "left") – Side from which to strip.


stripped (same type as values)