🍾 Xarray is now 10 years old! 🎉



classmethod Index.from_variables(variables, *, options)[source]#

Create a new index object from one or more coordinate variables.

This factory method must be implemented in all subclasses of Index.

The coordinate variables may be passed here in an arbitrary number and order and each with arbitrary dimensions. It is the responsibility of the index to check the consistency and validity of these coordinates.


variables (dict-like) – Mapping of Variable objects holding the coordinate labels to index.


index (Index) – A new Index object.