xarray.core.accessor_str.StringAccessor.ljust

xarray.core.accessor_str.StringAccessor.ljust#

StringAccessor.ljust(width, fillchar=' ')[source]#

Pad right side of each string in the array.

If width or ‘fillchar` is array-like, they are broadcast against the array and applied elementwise.

Parameters:
  • width (int or array-like of int) – Minimum width of resulting string; additional characters will be filled with fillchar. If array-like, it is broadcast.

  • fillchar (str or array-like of str, default: " ") – Additional character for filling, default is a space. If array-like, it is broadcast.

Returns:

filled (same type as values)