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
dataset/ETHPy150Open pydata/xarray/xarray/core/variable.py/_maybe_wrap_data