xarray.Dataset.copy

Dataset.copy(deep=False)

Returns a copy of this dataset.

If deep=True, a deep copy is made of each of the component variables. Otherwise, a shallow copy of each of the component variable is made, so that the underlying memory region of the new dataset is the same as in the original dataset.