# xray.DataArray.from_series¶

classmethod DataArray.from_series(series)

Convert a pandas.Series into an xray.DataArray.

If the series’s index is a MultiIndex, it will be expanded into a tensor product of one-dimensional coordinates (filling in missing values with NaN). Thus this operation should be the inverse of the to_series method.