xarray/core/variable.py
def _maybe_wrap_data(data):
    """
    Put pandas.Index and numpy.ndarray arguments in adapter objects to ensure
    they can be indexed properly.

    NumpyArrayAdapter, PandasIndexAdapter and LazilyOuterIndexedArray should
    all pass through unmodified.
    """
    if isinstance(data, pd.Index):
        return PandasIndexAdapter(data)
    return data

    Put pandas.Index and numpy.ndarray arguments in adapter objects to ensure
    they can be indexed properly.

    NumpyArrayAdapter, PandasIndexAdapter and LazilyOuterIndexedArray should
    all pass through unmodified.
    
Put pandas.Index and numpy.ndarray arguments in adapter objects to ensure
they can be indexed properly.


Put pandas . Index and numpy . ndarray arguments in adapter objects to ensure they can be indexed properly .
def _maybe_wrap_data(data):
    if isinstance(data, pd.Index):
        return PandasIndexAdapter(data)
    return data
def _maybe_wrap_data ( data ) : if isinstance ( data , pd . Index ) : return PandasIndexAdapter ( data ) return data
Put pandas.Index and numpy.ndarray arguments in adapter objects to ensure
they can be indexed properly.
Put pandas . Index and numpy . ndarray arguments in adapter objects to ensure they can be indexed properly .
"""
    Put pandas.Index and numpy.ndarray arguments in adapter objects to ensure
    they can be indexed properly.

    NumpyArrayAdapter, PandasIndexAdapter and LazilyOuterIndexedArray should
    all pass through unmodified.
    """
data