Skip to content

Commit 2083caf

Browse files
committed
fix single pandas index non-dimension coord name
1 parent 3f1d4a7 commit 2083caf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

xarray/core/indexes.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def create_variables(
701701
encoding = None
702702

703703
data = PandasIndexingAdapter(self.index, dtype=self.coord_dtype)
704-
var = IndexVariable(self.dim, data, attrs=attrs, encoding=encoding)
704+
var = IndexVariable(self.dim, data, attrs=attrs, encoding=encoding, name=name)
705705
return {name: var}
706706

707707
def to_pandas_index(self) -> pd.Index:

0 commit comments

Comments
 (0)