🍾 Xarray is now 10 years old! 🎉

xarray.core.coordinates.DataArrayCoordinates.merge

xarray.core.coordinates.DataArrayCoordinates.merge#

DataArrayCoordinates.merge(other)[source]#

Merge two sets of coordinates to create a new Dataset

The method implements the logic used for joining coordinates in the result of a binary operation performed on xarray objects:

  • If two index coordinates conflict (are not equal), an exception is raised. You must align your data before passing it to this method.

  • If an index coordinate and a non-index coordinate conflict, the non- index coordinate is dropped.

  • If two non-index coordinates conflict, both are dropped.

Parameters:

other (dict-like, optional) – A Coordinates object or any mapping that can be turned into coordinates.

Returns:

merged (Dataset) – A new Dataset with merged coordinates.