xarray.DataArray.str.center

DataArray.str.center(width, fillchar=' ')

Pad left and right side of each string in the array.

Parameters
  • width (int) – Minimum width of resulting string; additional characters will be filled with fillchar

  • fillchar (str, default: " ") – Additional character for filling, default is whitespace

Returns

filled

Return type

same type as values