xarray.Dataset.to_array

Dataset.to_array(dim='variable', name=None)

Convert this dataset into an xarray.DataArray

The data variables of this dataset will be broadcast against each other and stacked along the first axis of the new array. All coordinates of this dataset will remain coordinates.

Parameters
dimstr, optional

Name of the new dimension.

namestr, optional

Name of the new data array.

Returns
arrayxarray.DataArray