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

Return a new Variable with rolld data.

  • 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.


shifted (Variable) – Variable with the same dimensions and attributes but rolled data.