# xarray.IndexVariable.shift

#### IndexVariable.shift(shifts=None, fill_value=<NA>, \*\*shifts_kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/variable.py#L1425-L1450)

Return a new Variable with shifted data.

* **Parameters:**
  * **shifts** ([mapping](https://docs.python.org/3/glossary.html#term-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](../user-guide/terminology.html.md#term-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.
* **Returns:**
  **shifted** ([`Variable`](xarray.Variable.html.md#xarray.Variable)) – Variable with the same dimensions and attributes but shifted data.
