Select function takes a row (as a list) and a column name and returns the number in that
        column. If multiple rows are given, will return the first number that is not None.
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
62026
def selecttrue(table, field, complement=False):
    """"""

    return select(table, field, lambda v: bool(v), complement=complement)
1281799
public static int getFirstRow(RowSelection selection) {
		return (selection == null || selection.getFirstRow() == null) ? 0 : selection.getFirstRow();
	}
781405
int getIndex(int row, int column) {
        check(row, column);
        return row + (2 * n - (column + 1)) * column / 2;
    }
516901
def get_value_by_row_col(self, row, col):
        
        if row < 0 or row >= self.nRows or col < 0 or col >= self.nCols:
            raise ValueError("The row or col must be >=0 and less than "
                             "nRows (%d) or nCols (%d)!" % (self.nRows, self.nCols))
        else:
            value = self.data[int(round(row))][int(round(col))]
            if value == self.noDataValue:
                return None
            else:
                return value
998179
def selectis(table, field, value, complement=False):
    """"""

    return selectop(table, field, value, operator.is_, complement=complement)
944239
def select(table, cols="*", where=(), group="", order=(), limit=(), **kwargs):
    """"""
    where = dict(where, **kwargs).items()
    sql, args = makeSQL("SELECT", table, cols, where, group, order, limit)
    return execute(sql, args)
1153805
def find(self, id, columns=None):
        
        if not columns:
            columns = ['*']

        return self.where('id', '=', id).first(1, columns)
1078840
def add_select(self, *column):
        
        if not column:
            column = []

        self.columns += list(column)

        return self
323578
public TRow getRowByRowNumber(int rowNumber) {
        if (rows == null) {
            return null;
        }

        TRow result = null;
        for (TRow row : rows) {
            if (row.getRowNumber() == rowNumber) {
                result = row;
                break;
            }
        }
        return result;
    }
164777
def itake_column(list_, colx):
    
    if isinstance(colx, list):
        # multi select
        return ([row[colx_] for colx_ in colx] for row in list_)
    else:
        return (row[colx] for row in list_)
311777
def first(self, rows: List[Row]) -> List[Row]:
        
        if not rows:
            logger.warning("Trying to get first row from an empty list")
            return []
        return [rows[0]]
678065
def first(self, limit=1, columns=None):
        
        if not columns:
            columns = ["*"]

        return self.take(limit).get(columns).first()
1211106
def getvarcol(self, startrow=0, nrow=-1, rowincr=1):
        """"""
        return self._table.getvarcol(self._column, startrow, nrow, rowincr)
1299144
def select(self, cols, mode='list'):
        
        if isinstance(cols, stringtypes):
            cols = _split_cols(cols)
        if not cols:
            cols = [f.name for f in self.fields]
        return select_rows(cols, self, mode=mode)
954293
def get_column_list_from_select(self, txt, col_delim=','):
        
        return [c.strip().strip(',') for c in txt.split(col_delim)]
129735
def calc_columns_rows(n):
    
    num_columns = int(ceil(sqrt(n)))
    num_rows = int(ceil(n / float(num_columns)))
    return (num_columns, num_rows)