Return a map of column code values mapped to labels, for columns that have a label column

        If the column is not assocaited with a label column, it returns an identity map.

        WARNING! This reads the whole partition, so it is really slow
551512
def value_labels(self):
        

        from operator import itemgetter

        card = self.pstats.nuniques

        if self.label:
            ig = itemgetter(self.name, self.label.name)
        elif self.pstats.nuniques < MAX_LABELS:
            ig = itemgetter(self.name, self.name)
        else:
            return {}

        label_set = set()
        for row in self._partition:
            label_set.add(ig(row))

            if len(label_set) >= card:
                break

        d = dict(label_set)

        assert len(d) == len(label_set)  # Else the label set has multiple values per key

        return d
1203623
function labels (configName, callback) {

    if (callback) {
        return get(configName).schema.statics.getLabels(callback);
    }

    return get(configName).schema.statics.getLabels();
}
462962
def map_columns(col):
    
    if col.startswith('7'):
        # spectral data
        try:
            return VARIABLE_MAP[col]
        except KeyError:
            return col
    try:
        variable_name = VARIABLE_MAP[col[:3]]
        variable_number = col[3:]
        return variable_name + '_' + variable_number
    except KeyError:
        return col
871975
def get_labels(self, field):
        """"""
        return {c: self.cluster_meta.get(field, c)
                for c in self.clustering.cluster_ids}
807518
function getColumnValue(columnIdentifier)
  {
    // resolve the column identifier to the correct column if possible
    var column = resolveColumnIdentifierToColumn(
        columns, columnIdentifier, mapColumnNameToIndices);

    return column ? column.getRowValue(this) : undefined;
  }
181620
@Override
    public MapReadResult readLabels(Tile tile) {
        return readMapData(tile, tile, Selector.LABELS);
    }
78024
def applyKeyMapping(self, mapping):
		
		for coltype, colname in zip(self.columntypes, self.columnnames):
			if coltype in ligolwtypes.IDTypes and (self.next_id is None or colname != self.next_id.column_name):
				column = self.getColumnByName(colname)
				for i, old in enumerate(column):
					try:
						column[i] = mapping[old]
					except KeyError:
						pass
598890
def identity_attributes(cls):
        
        columns = inspect(cls).primary_key
        names = [c.name for c in columns if c.name not in ('width', 'height')]
        return names
285207
public static int findLabelColumn(MultipleObjectsBundle bundle) {
    for(int i = 0; i < bundle.metaLength(); i++) {
      if(TypeUtil.GUESSED_LABEL.isAssignableFromType(bundle.meta(i))) {
        return i;
      }
    }
    return -1;
  }
296552
def _label_columns_json(self):
        
        ret = {}
        for key, value in list(self.label_columns.items()):
            ret[key] = as_unicode(value.encode("UTF-8"))
        return ret
367227
def index_by(self, column_or_label):
        
        column = self._get_column(column_or_label)
        index = {}
        for key, row in zip(column, self.rows):
            index.setdefault(key, []).append(row)
        return index
25180
def get_column_keys_and_names(table):
    
    ins = inspect(table)
    return ((k, c.name) for k, c in ins.mapper.c.items())
996712
private void convertIdtoLabelLabels(
      List<Object> idLabels, EntityType entityType, DataService dataService) {
    final int nrLabels = idLabels.size();
    if (nrLabels > 0) {
      // Get entities for ids
      // Use Iterables.transform to work around List<String> to Iterable<Object> cast error
      Stream<Object> idLabelsWithoutNull =
          idLabels
              .stream()
              .filter(Objects::nonNull)
              .map(
                  untypedIdLabel ->
                      EntityUtils.getTypedValue(
                          untypedIdLabel.toString(), entityType.getIdAttribute()));

      // Map entity ids to labels
      Map<String, Entity> idToLabelMap = new HashMap<>();
      dataService
          .findAll(entityType.getId(), idLabelsWithoutNull)
          .forEach(entity -> idToLabelMap.put(entity.getIdValue().toString(), entity));

      for (int i = 0; i < nrLabels; ++i) {
        Object id = idLabels.get(i);
        if (id != null) // missing value label
        {
          idLabels.set(i, idToLabelMap.get(id.toString()));
        }
      }
    }
  }
770661
public static Map<String, CmsResourceTableProperty> getDefaultColumnsByName() {

        if (m_columnsByName == null) {
            m_columnsByName = Maps.newHashMap();
            for (CmsResourceTableProperty column : defaultProperties()) {
                m_columnsByName.put(column.getId(), column);
            }

        }
        return Collections.unmodifiableMap(m_columnsByName);
    }
1163643
function getColumnValueAsString(columnIdentifier)
  {
    // resolve the column identifier to the correct column if possible
    var column = resolveColumnIdentifierToColumn(
        columns, columnIdentifier, mapColumnNameToIndices);

    return column ? column.getRowValueAsString(this) : undefined;
  }
279412
public Map<String, Object> asMap() {
        Map<String, Object> map = new HashMap<>();
        Set<String> keys = columnNameToIdxMap.keySet();
        Iterator<String> iterator = keys.iterator();
        while (iterator.hasNext()) {
            String colum = iterator.next().toString();
            int index = columnNameToIdxMap.get(colum);
            map.put(colum, values[index]);
        }
        return map;
    }
608051
def get_quantmap(consfile):
    
    quantmap = {}
    maplist = basereader.get_element(consfile, 'mapList')
    for mapitem in maplist:
        quantmap[mapitem.attrib['label']] = mapitem.attrib['id']
    return quantmap