diff --git a/xarray/core/groupby.py b/xarray/core/groupby.py index e97499f06b4..151ef844f44 100644 --- a/xarray/core/groupby.py +++ b/xarray/core/groupby.py @@ -312,7 +312,7 @@ def __init__( if not hashable(group): raise TypeError( "`group` must be an xarray.DataArray or the " - "name of an xarray variable or dimension." + "name of an xarray variable or dimension. " f"Received {group!r} instead." ) group = obj[group]