Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions doc/user-guide/data-structures.rst
Original file line number Diff line number Diff line change
Expand Up @@ -808,16 +808,20 @@ For more examples and further discussion see :ref:`alignment and coordinate inhe
Coordinates
-----------

Coordinates are ancillary variables stored for ``DataArray`` and ``Dataset``
objects in the ``coords`` attribute:
The :py:class:`xarray.Coordinates` object is a dict-like container that contains coordinate variables and the associated indexes. It is mainly used as the return value of the ``coords`` property of the ``DataArray``, ``Dataset``, and ``DataTree``:

.. ipython:: python

foo.coords
ds.coords
dt.coords

But can also be used to customize the behavior of the constructors of these classes or to transfer or combine coordinates from different objects.

Coordinate variables
~~~~~~~~~~~~~~~~~~~~

Unlike attributes, xarray *does* interpret and persist coordinates in
operations that transform xarray objects. There are two types of coordinates
in xarray:
Coordinate variables (or simply coordinates) are ancillary variables stored in ``DataArray``, ``Dataset``, and ``DataTree`` objects. Unlike attributes, xarray *does* interpret coordinates in operations that transform xarray objects. There are two types of coordinates in xarray:

- **dimension coordinates** are one dimensional coordinates with a name equal
to their sole dimension (marked by ``*`` when printing a dataset or data
Expand Down
Loading