xarray.Dataset.__setitem__¶
-
Dataset.
__setitem__
(key, value)¶ Add an array to this dataset.
If value is a DataArray, call its select_vars() method, rename it to key and merge the contents of the resulting dataset into this dataset.
If value is an Variable object (or tuple of form
(dims, data[, attrs])
), add it to this dataset as a new variable.