# xarray.DataArray.str.translate

#### DataArray.str.translate(table)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/accessor_str.py#L1684-L1701)

Map characters of each string through the given mapping table.

* **Parameters:**
  **table** (`dict-like from` and `to str` or [`bytes`](https://docs.python.org/3/builtins/stdtypes.html#bytes) or [`int`](https://docs.python.org/3/builtins/functions.html#int)) – A mapping of Unicode ordinals to Unicode ordinals, strings, int
  or None. Unmapped characters are left untouched. Characters mapped
  to None are deleted. [`str.maketrans()`](https://docs.python.org/3/builtins/stdtypes.html#str.maketrans) is a helper function for
  making translation tables.
* **Returns:**
  **translated** (`same type as values`)
