uxarray.UxDataArray.to_dataset#
- UxDataArray.to_dataset(dim=None, *, name=None, promote_attrs=False)#
Convert a UxDataArray to a UxDataset.
- Parameters:
dim (Hashable, optional) – Name of the dimension on this array along which to split this array into separate variables. If not provided, this array is converted into a Dataset of one variable.
name (Hashable, optional) – Name to substitute for this array’s name. Only valid if
dim
is not provided.promote_attrs (bool, default: False) – Set to True to shallow copy attrs of UxDataArray to returned UxDataset.
- Returns:
uxds
- Return type:
UxDataSet