๐Ÿพ Xarray is now 10 years old! ๐ŸŽ‰

xarray.IndexVariable.roll

xarray.IndexVariable.roll#

IndexVariable.roll(shifts=None, **shifts_kwargs)[source]#

Return a new Variable with rolld data.

Parameters:
  • shifts (mapping of hashable to int) โ€“ Integer offset to roll along each of the given dimensions. Positive offsets roll to the right; negative offsets roll to the left.

  • **shifts_kwargs โ€“ The keyword arguments form of shifts. One of shifts or shifts_kwargs must be provided.

Returns:

shifted (Variable) โ€“ Variable with the same dimensions and attributes but rolled data.