xarray.DataArray.str.repeat#
- DataArray.str.repeat(repeats)[source]#
Repeat each string in the array.
If repeats is array-like, it is broadcast against the array and applied elementwise.
- Parameters:
repeats (
intor array-like ofint) – Number of repetitions. If array-like, it is broadcast.- Returns:
repeated (
same type as values) – Array of repeated string objects.