Dataset.__setitem__(key, value)[source]

Add an array to this dataset. Multiple arrays can be added at the same time, in which case each of the following operations is applied to the respective value.

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 a Variable object (or tuple of form (dims, data[, attrs])), add it to this dataset as a new variable.