# xarray.DataArray.str.zfill

#### DataArray.str.zfill(width)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/accessor_str.py#L1427-L1448)

Pad each string in the array by prepending ‘0’ characters.

Strings in the array are padded with ‘0’ characters on the
left of the string to reach a total string length  width. Strings
in the array with length greater or equal to width are unchanged.

If width is array-like, it is broadcast against the array and applied
elementwise.

* **Parameters:**
  **width** ([`int`](https://docs.python.org/3/builtins/functions.html#int) or [array-like](https://numpy.org/doc/stable/glossary.html#term-array_like) of [`int`](https://docs.python.org/3/builtins/functions.html#int)) – Minimum length of resulting string; strings with length less
  than width be prepended with ‘0’ characters. If array-like, it is broadcast.
* **Returns:**
  **filled** (`same type as values`)
