Remove trailing characters.

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

to_strip can either be a str or array-like of str. If array-like, it will be broadcast and applied elementwise.


to_strip (str or array-like of 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. If array-like, it is broadcast.


stripped (same type as values)