Locate a dataset.

        Args::

          name_or_index  dataset name or index number

        Returns::

          SDS instance for the dataset

        C library equivalent : SDselect
557377
def select(self, name_or_index):
        

        if isinstance(name_or_index, type(1)):
            idx = name_or_index
        else:
            try:
                idx = self.nametoindex(name_or_index)
            except HDF4Error:
                raise HDF4Error("select: non-existent dataset")
        id = _C.SDselect(self._id, idx)
        _checkErr('select', id, "cannot execute")
        return SDS(self, id)
681690
def select_paths(cls, dataset, selection):
        
        return [s[0] for s in np.array([{0: p} for p in dataset.data])[selection]]
1095371
def get_sdc_by_name(self, name):
        
        for sdc in self.sdc:
            if sdc.name == name:
                return sdc
        raise KeyError("SDC of that name not found")
759233
def get(self, dataset_name):
        
        url = "{0}/{1}".format(self._cached_datasets_url, dataset_name)
        return self._get_json(HTTPMethods.GET, url, self._get_read_key())
1020144
def select(self, **kwargs):
        
        kwargs_copy = self.base_dict.copy()
        kwargs_copy.update(**kwargs)
        kwargs_copy['dataset'] = kwargs.get('dataset', self.dataset(**kwargs))
        kwargs_copy['component'] = kwargs.get(
            'component', self.component(**kwargs))
        self._replace_none(kwargs_copy)        
        localpath = NameFactory.select_format.format(**kwargs_copy)
        if kwargs.get('fullpath', False):
            return self.fullpath(localpath=localpath)
        return localpath
388381
def where(options={})
      options.merge!(key: @api_key, vintage: @api_vintage)
      fail "Client requires a dataset (#{DATASETS})." if @dataset.nil?
      [:fields, :level].each do |f|
        fail ArgumentError, "#{f} is a requied parameter" if options[f].nil?
      end
      options[:within] = [options[:within]] unless options[:within].nil?
      Request.find(dataset, options)
    end
819945
public Node findDatasetsNode(String name) {
        if (name == null)
            return null;
        name = findDatasetsName(name);
        if (name == null)
            return null;
        return (Node)datasetsSom.getName2Node().get(name);
    }
991192
def find_by_index(self, cls, index_name, value):
        """"""
        cur = self._conn().cursor()

        query = 'select id,value from %s where %s = ?' % (
            cls.get_table_name(),
            index_name
        )

        found = []
        for row in cur.execute(query, (value,)):
            id, data = row[0], row[1]
            obj = cls.from_data(data)
            assert id == obj.id
            found.append(obj)

        cur.close()

        return found
1019429
def retrieve_file_handles_of_same_dataset(self, **args):
        '''
        
        '''

        mandatory_args = ['drs_id', 'version_number', 'data_node']
        esgfpid.utils.check_presence_of_mandatory_args(args, mandatory_args)
        LOGGER.debug('Looking for files of dataset "%s", version "%s".',
                     args['drs_id'], str(args['version_number']))

        if self.__switched_on:
            return self.__retrieve_file_handles_of_same_dataset(**args)
        else:
            msg = 'Cannot retrieve handles of files of the same dataset.'
            raise esgfpid.exceptions.SolrSwitchedOff(msg)
416866
public static void checkDatasetName(String namespace, String name) {
    Preconditions.checkNotNull(namespace, "Namespace cannot be null");
    Preconditions.checkNotNull(name, "Dataset name cannot be null");
    ValidationException.check(Compatibility.isCompatibleName(namespace),
        "Namespace %s is not alphanumeric (plus '_')",
        namespace);
    ValidationException.check(Compatibility.isCompatibleName(name),
        "Dataset name %s is not alphanumeric (plus '_')",
        name);
  }
654530
def select(cls, dataset, selection_mask=None, **selection):
        
        if not dataset.data:
            return []
        ds = cls._inner_dataset_template(dataset)
        data = []
        for d in dataset.data:
            ds.data = d
            sel = ds.interface.select(ds, **selection)
            data.append(sel)
        return data
716969
def get_dataset(self, dsid, dsinfo):
        
        data = self[dsinfo.get('file_key', dsid.name)]
        data.attrs.update(dsinfo)

        data.attrs["platform_name"] = self['/attr/satellite_name']
        data.attrs["sensor"] = self['/attr/instrument_name']

        return data
765142
def ls(dataset_uri):
    
    dataset = dtoolcore.DataSet.from_uri(dataset_uri)
    for overlay_name in dataset.list_overlay_names():
        click.secho(overlay_name)
1298925
def image_path_from_index(self, index):
        
        assert self.image_set_index is not None, "Dataset not initialized"
        name = self.image_set_index[index]
        image_file = os.path.join(self.image_dir, 'images', name)
        assert os.path.isfile(image_file), 'Path does not exist: {}'.format(image_file)
        return image_file
306606
def relpath(dataset_uri, item_identifier):
    
    dataset = dtoolcore.DataSet.from_uri(dataset_uri)
    try:
        props = dataset.item_properties(item_identifier)
    except KeyError:
        click.secho(
            "No such item in dataset: {}".format(item_identifier),
            fg="red",
            err=True
        )
        sys.exit(21)
    click.secho(props["relpath"])
182392
def _dataset_load_from_hdx(self, id_or_name):
        # type: (str) -> bool
        

        if not self._load_from_hdx('dataset', id_or_name):
            return False
        self._dataset_create_resources()
        return True
347029
def getDataset(self, id_):
        
        if id_ not in self._datasetIdMap:
            raise exceptions.DatasetNotFoundException(id_)
        return self._datasetIdMap[id_]