Get the row matching value for a particular column.
    If exactly one row matchs, return index of that row,
    Otherwise raise KeyError.
557548
def get_unique_match(table, colname, value):
    
    # FIXME, This is here for python 3.5, where astropy is now returning bytes
    # instead of str
    if table[colname].dtype.kind in ['S', 'U']:
        mask = table[colname].astype(str) == value
    else:
        mask = table[colname] == value

    if mask.sum() != 1:
        raise KeyError("%i rows in column %s match value %s" %
                       (mask.sum(), colname, value))
    return np.argmax(mask)
1085563
def get_column_index(self, header):
        
        try:
            index = self._column_headers.index(header)
            return index
        except ValueError:
            raise_suppressed(KeyError(("'{}' is not a header for any "
                                       "column").format(header)))
884919
def get_cell(row_index, column_index)
      if within_range?(row_index, column_index)
        @rows[row_index][column_index].v
      else
        raise RangeError, "row_index and column_index MUST be < @rows.size and @cols.size", caller
      end
    end
1047577
def _get_column_value(self, obj, column):
        
        return self._get_formatted_val(obj, column['__col__'].key, column)
983511
def exact_(self, column, *values):
        
        df = self._exact(column, *values)
        if df is None:
            self.err("Can not select exact data")
        return self._duplicate_(df)
677743
def get_row_dict(self, row_idx):
        

        try:
            row = self._rows[row_idx]
        except TypeError:
            row = self._rows[self._row_name_idx[row_idx]]

        if isinstance(row, dict):
            return row

        else:
            if row_idx not in self._row_memo:
                self._row_memo[row_idx] = dict((self._column_name_list[idx], v) for idx, v in enumerate(row) if v != self._default_value)

            return self._row_memo[row_idx]
448874
def get_row(self, index, default=None):
        """"""
        if not isinstance(index, int) or index < 0 or index >= len(self._rows):
            return default
        return self._rows[index]
782072
public Object get(int row, @NotNull String column) {
        return rows.get(row).get(column);
    }
692923
def get(self, key=NOT_SET, index=NOT_SET, d=None):
		
		if index is NOT_SET and key is not NOT_SET:
			try:
				index, value = self._dict[key]
			except KeyError:
				return d
			else:
				return value
		elif index is not NOT_SET and key is NOT_SET:
			try:
				key, value = self._list[index]
			except IndexError:
				return d
			else:
				return value
		else:
			raise KEY_EQ_INDEX_ERROR
1242993
def translate_row_col_to_index(self, row, col):
        
        try:
            result = self._line_start_indexes[row]
            line = self.lines[row]
        except IndexError:
            if row < 0:
                result = self._line_start_indexes[0]
                line = self.lines[0]
            else:
                result = self._line_start_indexes[-1]
                line = self.lines[-1]

        result += max(0, min(col, len(line)))

        # Keep in range. (len(self.text) is included, because the cursor can be
        # right after the end of the text as well.)
        result = max(0, min(result, len(self.text)))
        return result
785021
def _get_key_index(self, row):
        """"""
        # Don't bother with empty tracks
        if len(self.keys) == 0:
            return -1

        # No track values are defined yet
        if row < self.keys[0].row:
            return -1

        # Get the insertion index
        index = bisect.bisect_left(self.keys, row)
        # Index is within the array size?
        if index < len(self.keys):
            # Are we inside an interval?
            if row < self.keys[index].row:
                return index - 1
            return index

        # Return the last index
        return len(self.keys) - 1
1109620
def _match(self):
        """"""
        #disable optimized matching
        optimized_rows = None
        optimized_columns = None
        for match in self.__match_rows(optimized_rows):
            #match in rows
            yield match
        for match in self.__match_rows(optimized_columns,
                                       transpose=True):
            #match in columns and transpose coordinates
            yield match
1364997
def getvarcol(self, columnname, startrow=0, nrow=-1, rowincr=1):
        
        return self._getvarcol(columnname, startrow, nrow, rowincr)
781405
int getIndex(int row, int column) {
        check(row, column);
        return row + (2 * n - (column + 1)) * column / 2;
    }
473332
def filter(self, column, condition='!=', value=None):
        
        ret = self.__class__(
            columns=self.columns, row_columns=self.row_columns, tab=self.tab,
            key_on=self.key_on)
        for row in self:
            if getattr(row[column], condition, None):
                if eval('row[column].%s(%s)' % (condition, value)):
                    ret.append(row)
            if eval('row[column] %s value' % condition):
                ret.append(row)
        return ret
578909
def getValue(self, row):
        ''
        if self._cachedValues is None:
            return self.calcValue(row)

        k = id(row)
        if k in self._cachedValues:
            return self._cachedValues[k]

        ret = self.calcValue(row)
        self._cachedValues[k] = ret

        cachesize = options.col_cache_size
        if cachesize > 0 and len(self._cachedValues) > cachesize:
            self._cachedValues.popitem(last=False)

        return ret
321993
def select_number(self, rows: List[Row], column: NumberColumn) -> Number:
        
        numbers: List[float] = []
        for row in rows:
            cell_value = row.values[column.name]
            if isinstance(cell_value, float):
                numbers.append(cell_value)

        return numbers[0] if numbers else -1