Return a column one by one

        :raises: StopIteration
553122
def next(self):
        
        if self._cur_col >= len(self._rec):
            self._cur_col = 0
            raise StopIteration
        col = self._rec[self._cur_col]
        self._cur_col += 1
        return col
1320855
def _get_column_ends(self):
        '''
        '''
        ends = collections.Counter()
        for line in self.text.splitlines():
            for matchobj in re.finditer('\s{2,}', line.lstrip()):
                ends[matchobj.end()] += 1
        return ends
656412
def _getColumnList(self):
        
        columnList = []
        for columnName in self.columnNames:
            column = self.columns[columnName]
            type = column.getType()
            if type is None:
                type = 'text'
            columnList.append(
                {u'name': columnName,
                 u'type': type.decode('ascii')})
        return columnList
309424
def hasColumn(self, column, recurse=True, flags=0):
        
        return column in self.columns(recurse=recurse, flags=flags)
113151
def getcolkeyword(self, columnname, keyword):
        
        if isinstance(keyword, str):
            return self._getkeyword(columnname, keyword, -1)
        else:
            return self._getkeyword(columnname, '', keyword)
954293
def get_column_list_from_select(self, txt, col_delim=','):
        
        return [c.strip().strip(',') for c in txt.split(col_delim)]
979618
def process_column(self, idx, value):
        ""
        if value is not None:
            value = str(value).decode(self.encoding)
        return value
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'
1170730
def index(self, column):  # pylint: disable=C6409
        
        for i, key in enumerate(self._keys):
            if key == column:
                return i
        raise ValueError('Column "%s" not found.' % column)
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
623466
def indexcol(self, col: str):
        
        try:
            self.df[col] = self.df.index.values
        except Exception as e:
            self.err(e)
            return
        self.ok("Column", col, "added from the index")
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
801889
def repeat(col, n):
    
    sc = SparkContext._active_spark_context
    return Column(sc._jvm.functions.repeat(_to_java_column(col), n))
328411
def _from_list_record(data):
    
    return [Schema._get_field_entry('Column%d' % (i + 1), value) for i, value in enumerate(data)]
992847
def _GetRow(self, columns=None):
        """"""

        row = self._table[self._row_index]
        if columns:
            result = []
            for col in columns:
                if col not in self.header:
                    raise TableError("Column header %s not known in table." % col)
                result.append(row[self.header.index(col)])
            row = result
        return row
898694
def find_column(token):
    
    i = token.lexpos
    input = token.lexer.lexdata

    while i > 0:
        if input[i - 1] == '\n':
            break
        i -= 1

    column = token.lexpos - i + 1

    return column
39318
def column_converter(string):
    
    column = string.strip(',')
    if '-' in column:
        column_range = map(int, column.split('-'))
        # For decreasing ranges, increment the larger value, reverse the
        # passing to range (so it will accept the input), and finally
        # reverse the output ([::-1])
        if column_range[0] > column_range[1]:
            column_range[0] += 1
            return [i for i in range(*column_range[::-1])][::-1]
        # For normal ranges, increment the larger value.
        column_range[1] += 1
        return [i for i in range(*column_range)]
    if ',' in column:
        columns = column.split(',')
        return map(int, columns)
    return [int(column)]