# xarray.Index.from_variables

#### *classmethod* Index.from_variables(variables, , options)[[source]](https://github.com/pydata/xarray/blob/main/xarray/core/indexes.py#L66-L96)

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.

* **Parameters:**
  * **variables** ([dict-like](https://docs.python.org/3/glossary.html#term-mapping)) – Mapping of [`Variable`](xarray.Variable.html.md#xarray.Variable) objects holding the coordinate labels
    to index.
  * **options** ([dict-like](https://docs.python.org/3/glossary.html#term-mapping)) – Keyword arguments passed to this constructor. Propagated from
    the `**options` argument of [`xarray.DataArray.set_xindex()`](xarray.DataArray.set_xindex.html.md#xarray.DataArray.set_xindex)
    or [`xarray.Dataset.set_xindex()`](xarray.Dataset.set_xindex.html.md#xarray.Dataset.set_xindex).
* **Returns:**
  **index** ([`Index`](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.Index.html#pandas.Index)) – A new Index object.
