Gets pretty-formatted row

        :param row: List of data
        :param filler: Fill empty columns with this char
        :param splitter: Separate columns with this char
        :return: Pretty formatted row
496735
def pretty_format_row(self, row, filler=" ", splitter="|"):
        
        return self.get_pretty_row(
            row,
            filler,
            splitter
        )
544351
private static RowData parseDataRow(String line, GenMunger munger) {
      if( line.isEmpty() || line.equals("") )
        return null;
      String[] inputData = line.split(",(?=([^\"]*\"[^\"]*\")*[^\"]*$)|(,)", -1);
      for(int i=0;i<inputData.length;++i)
        inputData[i]=inputData[i]==null?"":inputData[i];
    if( inputData.length != munger.inNames().length )
      return null;
    return munger.fillDefault(inputData);
  }
536244
def transpose(self, rows):
        
        res = OrderedDict()
        for row, cols in rows.items():
            for col, cell in cols.items():
                if col not in res:
                    res[col] = OrderedDict()
                res[col][row] = cell
        return res
1084176
def row(self, columnnames=[], exclude=False):
        
        from .tablerow import tablerow
        return tablerow(self, columnnames, exclude)
435524
def format(self):
        ''' 
        '''
        self.max_lengths = []
        for row in self.rows:
            if len(self.max_lengths) < len(row):
                self.max_lengths += [0] * (len(row) - len(self.max_lengths))
            for idx, val in enumerate(row):
                len_cell = len(str(val)) if val else 0
                if self.max_lengths[idx] < len_cell:
                    self.max_lengths[idx] = len_cell
        return self.max_lengths
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
173030
def to_prettytable(df):
    
    pt = PrettyTable()
    pt.field_names = df.columns
    for tp in zip(*(l for col, l in df.iteritems())):
        pt.add_row(tp)
    return pt
813922
def colorize(self, col, row, value=None):
        ''

#        colorstack = tuple(c.coloropt for c in self.getColorizers() if wrapply(c.func, self, col, row, value))

        colorstack = []
        for colorizer in self.getColorizers():
            try:
                r = colorizer.func(self, col, row, value)
                if r:
                    colorstack.append(colorizer.coloropt if colorizer.coloropt else r)
            except Exception as e:
                exceptionCaught(e)

        return colors.resolve_colors(tuple(colorstack))
909465
def get_cell_format(column_dict, key=None):
    
    format = column_dict.get('format')
    prop = column_dict.get('__col__')

    if format is None and prop is not None:
        if hasattr(prop, 'columns'):
            sqla_column = prop.columns[0]
            column_type = getattr(sqla_column.type, 'impl', sqla_column.type)
            format = FORMAT_REGISTRY.get_item(column_type)
    return format
741932
def addRow(self, *row):
        
        row     = [ str(item) for item in row ]
        len_row = [ len(item) for item in row ]
        width   = self.__width
        len_old = len(width)
        len_new = len(row)
        known   = min(len_old, len_new)
        missing = len_new - len_old
        if missing > 0:
            width.extend( len_row[ -missing : ] )
        elif missing < 0:
            len_row.extend( [0] * (-missing) )
        self.__width = [ max( width[i], len_row[i] ) for i in compat.xrange(len(len_row)) ]
        self.__cols.append(row)
738415
def parse_row(self):
        
        fields = self.mapping
        for i, cell in enumerate(self.row[0:len(fields)]):
            field_name, field_type = fields[str(i)]
            parsed_cell = self.clean_cell(cell, field_type)
            self.parsed_row[field_name] = parsed_cell
195487
def _parse_row(row):
        

        data = []

        labels = HtmlTable._get_row_tag(row, "th")
        if labels:
            data += labels

        columns = HtmlTable._get_row_tag(row, "td")
        if columns:
            data += columns

        return data
207733
def _split_row(self, row, border):
        
        if border:
            if row.startswith('|'):
                row = row[1:]
            if row.endswith('|'):
                row = row[:-1]
        return row.split('|')
259144
def format_row(self, row):
        
        res = []
        headers = getattr(self, 'headers', [])
        for column in headers:
            column_name = column['name']
            value = row.get(column_name, '')
            if hasattr(self, "format_%s" % column_name):
                value = getattr(self, "format_%s" % column_name)(value)
            res.append(value)
        return res
1316329
def _HashRow(cls, row):
    
    values = []
    for value in row:
      try:
        value = '{0!s}'.format(value)
      except UnicodeDecodeError:
        # In Python 2, blobs are "read-write buffer" and will cause a
        # UnicodeDecodeError exception if we try format it as a string.
        # Since Python 3 does not support the buffer type we cannot check
        # the type of value.
        value = repr(value)

      values.append(value)

    return hash(' '.join(values))
488163
def format_results(self, rows):
        
        needs_utc = _DJANGO_VERSION >= 14 and settings.USE_TZ
        if not (needs_utc or not self.driver_supports_utf8):
            return tuple(rows)
        # FreeTDS (and other ODBC drivers?) don't support Unicode yet, so we
        # need to decode UTF-8 data coming from the DB
        fr = []
        for row in rows:
            if not self.driver_supports_utf8 and isinstance(row, binary_type):
                row = row.decode(self.encoding)

            elif needs_utc and isinstance(row, datetime.datetime):
                row = row.replace(tzinfo=timezone.utc)
            fr.append(row)
        return tuple(fr)
1036183
def _get_cols(row_content):
    
    cols = []
    subcell_col = []
    prev_bar = None
    for _coord, item in row_content:
        if isinstance(item, LTTextLine):
            subcell_col.append(item)
        else:  # bar, add column content
            # When there is no content, we count a None column
            if prev_bar:
                bar_ranges = (prev_bar, item)
                col_items = subcell_col if subcell_col else [None]
                cols.extend([bar_ranges, col_items])
            prev_bar = item
            subcell_col = []
    # Remove extra column before first bar
    return cols