def __getitem__(self, key):
        """Access variables or coordinates this dataset as a
        :py:class:`~xarray.DataArray`.

        Indexing with a list of names will return a new ``Dataset`` object.
        """
        if utils.is_dict_like(key):
            return self.isel(**key)

        if hashable(key):
            return self._construct_dataarray(key)
        else:
            return self._copy_listed(np.asarray(key))
def __getitem__ ( self , key ) : if utils . is_dict_like ( key ) : return self . isel ( ** key ) if hashable ( key ) : return self . _construct_dataarray ( key ) else : return self . _copy_listed ( np . asarray ( key ) )
Access variables or coordinates this dataset as a
        :py:class:`~xarray.DataArray`.

        Indexing with a list of names will return a new ``Dataset`` object.