# xarray.Variable.roll

#### Variable.roll(shifts=None, \*\*shifts_kwargs)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/variable.py#L1590-L1614)

Return a new Variable with rolled data.

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