# xarray.Variable.transpose

#### Variable.transpose(\*dim, missing_dims='raise')[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/variable.py#L1616-L1663)

Return a new Variable object with transposed dimensions.

* **Parameters:**
  * **\*dim** (`Hashable`, *optional*) – By default, reverse the dimensions. Otherwise, reorder the
    dimensions to this order.
  * **missing_dims** (`{"raise", "warn", "ignore"}`, *default*: `"raise"`) – What to do if dimensions that should be selected from are not present in the
    Variable:
    - “raise”: raise an exception
    - “warn”: raise a warning, and ignore the missing dimensions
    - “ignore”: ignore the missing dimensions
* **Returns:**
  **transposed** ([`Variable`](xarray.Variable.html.md#xarray.Variable)) – The returned object has transposed data and dimensions with the
  same attributes as the original.

### Notes

This operation returns a view of this variable’s data. It is
lazy for dask-backed Variables but not for numpy-backed Variables.

#### SEE ALSO
[`numpy.transpose`](https://numpy.org/doc/stable/reference/generated/numpy.transpose.html#numpy.transpose)
