xarray.Dataset.update¶
-
Dataset.
update
(other: Union[Dataset, Mapping[Hashable, Union[DataArray, xarray.core.variable.Variable, Tuple[Hashable, Any], Tuple[Sequence[Hashable], Any]]]], inplace: bool = None) → Dataset¶ Update this dataset’s variables with those from another dataset.
- Parameters
- otherDataset or castable to Dataset
Variables with which to update this dataset. One of:
Dataset
mapping {var name: DataArray}
mapping {var name: Variable}
mapping {var name: (dimension name, array-like)}
mapping {var name: (tuple of dimension names, array-like)}
- inplacebool, optional
If True, merge the other dataset into this dataset in-place. Otherwise, return a new dataset object.
- Returns
- updatedDataset
Updated dataset.
- Raises
- ValueError
If any dimensions would have inconsistent sizes in the updated dataset.