Process a single column.
979618
def process_column(self, idx, value):
        ""
        if value is not None:
            value = str(value).decode(self.encoding)
        return value
372181
def parse_column(column):
    
    try:
        float_attempt = [float(i) for i in column]
    except ValueError:
        return column
    else:
        try:
            int_attempt = [int(j) for j in column]
        except ValueError:
            return float_attempt
        else:
            return int_attempt
1121940
def getcol(self, startrow=0, nrow=-1, rowincr=1):
        """"""
        return self._table.getcol(self._column, startrow, nrow, rowincr)
541057
def convert_column(self, values):
        """"""
        assert all(values >= 0), 'Cannot normalize a column with negatives'
        total = sum(values)
        if total > 0:
            return values / total
        else:
            return values
767861
def process_result_value(self, value: Optional[str],
                             dialect: Dialect) -> List[int]:
        """"""
        retval = self._dbstr_to_intlist(value)
        return retval
1341118
def _stringify_column(self, column_index):
        '''
        
        '''
        table_column = TableTranspose(self.table)[column_index]
        prior_cell = None
        for row_index in range(self.start[0], self.end[0]):
            cell, changed = self._check_interpret_cell(table_column[row_index], prior_cell, row_index, column_index)
            if changed:
                table_column[row_index] = cell
            prior_cell = cell
619790
function pluck(column) {
    this._method = 'pluck';
    this._single.pluck = column;
    this._statements.push({
      grouping: 'columns',
      type: 'pluck',
      value: column
    });
    return this;
  }
981050
def run(self):
        """"""
        query = self.query

        # count before filtering
        self.cardinality = query.add_columns(self.columns[0].sqla_expr).count()

        self._set_column_filter_expressions()
        self._set_global_filter_expression()
        self._set_sort_expressions()
        self._set_yadcf_data(query)

        # apply filters
        query = query.filter(
            *[e for e in self.filter_expressions if e is not None])

        self.cardinality_filtered = query.add_columns(
            self.columns[0].sqla_expr).count()

        # apply sorts
        query = query.order_by(
            *[e for e in self.sort_expressions if e is not None])

        # add paging options
        length = int(self.params.get('length'))
        if length >= 0:
            query = query.limit(length)
        elif length == -1:
            pass
        else:
            raise (ValueError(
                'Length should be a positive integer or -1 to disable'))
        query = query.offset(int(self.params.get('start')))

        # add columns to query
        query = query.add_columns(*[c.sqla_expr for c in self.columns])

        # fetch the result of the queries
        column_names = [
            col.mData if col.mData else str(i)
            for i, col in enumerate(self.columns)
        ]
        self.results = [{k: v
                         for k, v in zip(column_names, row)}
                        for row in query.all()]
415376
def ReorderByColumn( self, column ):
        """"""
        # TODO: store current selection and re-select after sorting...
        single_column = self.SetNewOrder( column )
        self.reorder( single_column = True )
        self.Refresh()
479565
def convert_unit(self, column, value):
        ""
        if column not in self.units:
            return value

        # Try to interpret the value as a unit
        value = self.ureg(value)
        if isinstance(value, numbers.Number):
            # It's just a bare number, assume it's the column unit
            return value

        column_unit = self.ureg(self.units[column])
        return value.to(column_unit).magnitude
101401
def process_line(self, line):
        ""
        cleaned = []
        columns = line.split(self.indel)
        # Populate indices if not defined
        if not self.indices:
            self.indices = range(len(columns))
        for i in self.indices:
            # Support turning an in col into multiple out cols
            out = self.process_column(i, columns[i])
            if isinstance(out, (list, tuple)):
                cleaned.extend(out)
            else:
                cleaned.append(out)
        return self.outdel.join(cleaned) + '\n'
367543
def process_header(self, headers):
        """"""

        return [c.name for c in self.source.dest_table.columns][1:]
1169681
protected void processField(Row row, String fieldIDColumn, String entityIDColumn, Object value)
   {
      processField(row, fieldIDColumn, row.getInteger(entityIDColumn), value);
   }
19872
def process(self, stream):
        """"""
        EOS_TTYPE = T.Whitespace, T.Comment.Single

        # Run over all stream tokens
        for ttype, value in stream:
            # Yield token if we finished a statement and there's no whitespaces
            # It will count newline token as a non whitespace. In this context
            # whitespace ignores newlines.
            # why don't multi line comments also count?
            if self.consume_ws and ttype not in EOS_TTYPE:
                yield sql.Statement(self.tokens)

                # Reset filter and prepare to process next statement
                self._reset()

            # Change current split level (increase, decrease or remain equal)
            self.level += self._change_splitlevel(ttype, value)

            # Append the token to the current statement
            self.tokens.append(sql.Token(ttype, value))

            # Check if we get the end of a statement
            if self.level <= 0 and ttype is T.Punctuation and value == ';':
                self.consume_ws = True

        # Yield pending statement (if any)
        if self.tokens:
            yield sql.Statement(self.tokens)
36637
protected function processColumns () {
        // Get a schema manager and get the list of columns
        $sm = $this->conn->getSchemaManager();
        $columns = $sm->listTableColumns($this->tableName);

        $type_lookup = array();

        /**
         * @var $col Column
         */
        foreach($columns as $col) {
            $type_lookup[$col->getName()] = $col;
        }

        foreach($this->colDefs as $item) {
            $id = $item['id'];
            $category = $item['category'];
            $opts = $item['options'];

            /**
             * @var $target SQLColumn
             */
            $target = null;

            switch($category) {
                case SQLColumn::CATEGORY_VALUE:
                    $target = new ValueColumn($id, $category, $opts);
                    break;
                // case "foreign":
                //     $target = new ForeignColumn($id, $category, $opts);
                //     break;
                case SQLColumn::CATEGORY_PRIMARY:
                    $target = new PrimaryColumn($id, $category, $opts);
                    break;
                case SQLColumn::CATEGORY_EXTERNAL:
                    $target = new ExternalColumn ($id, $category, $opts);
                    break;
                default:
                    //TODO: Throw library-specific exceptions
                    throw new \Exception("Unknown category for column $category");
            }

            $target->doctrineColumnLookup($type_lookup);
            $target->init ();

            $this->columns[$id] = $target;
        }
    }
1024801
def get_column(self, column):
        
        if "(" in str(column):
            temp_list = column.split("(")
            key = temp_list[1].strip("()")
            func = temp_list[0].lower()
        else:
            key = column
            func = None

        if "." not in key:
            for i in self.columns:
                if i.split(".")[1] == key:
                    key = i
                    break

        col = map(
            lambda x: x.get(
                key
            ),
            self.rows
        )

        if func is not None:
            if func == "sum":
                return [sum(col)]
            elif func == "max":
                return [max(col)]
            elif func == "min":
                return [min(col)]
            elif func == "avg":
                return [sum(col) / float(len(col))]
            elif func == "count":
                return [len(col)]
            elif func == "distinct":
                return list(set(col))
            else:
                raise Exception(
                    "Unknown function called on column"
                )

        return col
15323
def _jseq(self, cols, converter=None):
        """"""
        return _to_seq(self.sql_ctx._sc, cols, converter)