🍾 Xarray is now 10 years old! πŸŽ‰



IndexVariable.shift(shifts=None, fill_value=<NA>, **shifts_kwargs)[source]#

Return a new Variable with shifted data.

  • shifts (mapping of the form {dim: offset}) – Integer offset to shift along each of the given dimensions. Positive offsets shift to the right; negative offsets shift to the left.

  • fill_value (scalar, optional) – Value to use for newly missing values

  • **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 shifted data.