xarray.DataArray.swap_dims¶
-
DataArray.
swap_dims
(self, dims_dict: Mapping[Hashable, Hashable]) → 'DataArray'¶ Returns a new DataArray with swapped dimensions.
- Parameters
- dims_dictdict-like
Dictionary whose keys are current dimension names and whose values are new names. Each value must already be a coordinate on this array.
- Returns
- renamedDataset
DataArray with swapped dimensions.
See also