Skip to content

Commit 4194920

Browse files
OriolAbrilpre-commit-ci[bot]dcherian
authored
Update error message when saving multiindex (#7475)
* update error message on saving multiindex * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Deepak Cherian <[email protected]>
1 parent ec1d328 commit 4194920

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

xarray/conventions.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,11 @@ def ensure_not_multiindex(var: Variable, name: T_Name = None) -> None:
197197
if isinstance(var, IndexVariable) and isinstance(var.to_index(), pd.MultiIndex):
198198
raise NotImplementedError(
199199
"variable {!r} is a MultiIndex, which cannot yet be "
200-
"serialized to netCDF files "
201-
"(https://github.com/pydata/xarray/issues/1077). Use "
202-
"reset_index() to convert MultiIndex levels into coordinate "
203-
"variables instead.".format(name)
200+
"serialized to netCDF files. Instead, either use reset_index() "
201+
"to convert MultiIndex levels into coordinate variables instead "
202+
"or use https://cf-xarray.readthedocs.io/en/latest/coding.html.".format(
203+
name
204+
)
204205
)
205206

206207

0 commit comments

Comments
 (0)