MCPcopy
hub / github.com/pydata/xarray / rstrip

Method rstrip

xarray/core/accessor_str.py:1622–1643  ·  view source on GitHub ↗

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 appli

(self, to_strip: str | bytes | Any = None)

Source from the content-addressed store, hash-verified

1620 return self.strip(to_strip, side="left")
1621
1622 def rstrip(self, to_strip: str | bytes | Any = None) -> T_DataArray:
1623 """
1624 Remove trailing characters.
1625
1626 Strip whitespaces (including newlines) or a set of specified characters
1627 from each string in the array from the right side.
1628
1629 `to_strip` can either be a ``str`` or array-like of ``str``.
1630 If array-like, it will be broadcast and applied elementwise.
1631
1632 Parameters
1633 ----------
1634 to_strip : str or array-like of str or None, default: None
1635 Specifying the set of characters to be removed.
1636 All combinations of this set of characters will be stripped.
1637 If None then whitespaces are removed. If array-like, it is broadcast.
1638
1639 Returns
1640 -------
1641 stripped : same type as values
1642 """
1643 return self.strip(to_strip, side="right")
1644
1645 def wrap(self, width: int | Any, **kwargs) -> T_DataArray:
1646 """

Callers 15

mainFunction · 0.80
stripMethod · 0.80
summarize_indexFunction · 0.80
_element_formatterFunction · 0.80
_has_netcdf_extMethod · 0.80
_open_existing_arrayMethod · 0.80
guess_can_openMethod · 0.80
test_reprMethod · 0.80
test_repr_multiindexMethod · 0.80
test_diff_array_reprMethod · 0.80
test_empty_str_methodsFunction · 0.80

Calls 1

stripMethod · 0.95