xarray.DataArray.cf.axes

DataArray.cf.axes

Mapping valid Axis standard names for .cf[] to variable names.

This is useful for checking whether a key is valid for indexing, i.e. that the attributes necessary to allow indexing by that key exist. However, it will only return the Axis names ("X", "Y", "Z", "T") present in .coords, not in .data_vars.

Returns:
dict

Dictionary with keys that can be used with __getitem__ or as .cf[key]. Keys will be the appropriate subset of (“X”, “Y”, “Z”, “T”). Values are lists of variable names that match that particular key.