File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -436,7 +436,9 @@ def __getitem__(self, key):
436436 elif key in _CELL_MEASURES :
437437 raise NotImplementedError ("measures not implemented for Dataset yet." )
438438 else :
439- raise KeyError (f"Dataset.cf does not understand the key { key } " )
439+ raise KeyError (
440+ f"Dataset.cf does not understand the key { key !r} . Use Dataset.cf.describe() to see a list of key names that can be interpreted."
441+ )
440442
441443
442444@xr .register_dataarray_accessor ("cf" )
@@ -448,4 +450,6 @@ def __getitem__(self, key):
448450 elif key in _CELL_MEASURES :
449451 return self ._obj [_get_measure (self ._obj , key )]
450452 else :
451- raise KeyError (f"DataArray.cf does not understand the key { key } " )
453+ raise KeyError (
454+ f"DataArray.cf does not understand the key { key !r} . Use DataArray.cf.describe() to see a list of key names that can be interpreted."
455+ )
You can’t perform that action at this time.
0 commit comments