'Return a list of formatted string representation of column values.
Parameters
max_lines : int
Maximum lines of output (header + data rows)
show_name : bool
Include column name. Default is True.
show_unit : bool
Include a header row for unit.  Default is to show a row
for units only if one or more columns has a defined value
for the unit.
show_dtype : bool
Include column dtype. Default is False.
show_length : bool
Include column length at end.  Default is to show this only
if the column is not shown completely.
html : bool
Output column as HTML
align : str
Left/right alignment of columns. Default is \'>\' (right) for all
columns. Other allowed values are \'<\', \'^\', and \'0=\' for left,
centered, and 0-padded, respectively.
Returns
lines : list
List of lines with formatted column values
outs : dict
Dict which is used to pass back additional values
defined within the iterator.'

def _pformat_col(self, col, max_lines=None, show_name=True, show_unit=None, show_dtype=False, show_length=None, html=False, align=None):

    if (show_unit is None):
        show_unit = (col.info.unit is not None)
    outs = {}
    col_strs_iter = self._pformat_col_iter(col, max_lines, show_name=show_name, show_unit=show_unit, show_dtype=show_dtype, show_length=show_length, outs=outs)
    col_strs = list(col_strs_iter)
    if (len(col_strs) > 0):
        col_width = max((len(x) for x in col_strs))
    if html:
        from ..utils.xml.writer import xml_escape
        n_header = outs[u'n_header']
        for (i, col_str) in enumerate(col_strs):
            if (i == (n_header - 1)):
                continue
            td = (u'th' if (i < n_header) else u'td')
            val = u'<{0}>{1}</{2}>'.format(td, xml_escape(col_str.strip()), td)
            row = ((u'<tr>' + val) + u'</tr>')
            if (i < n_header):
                row = ((u'<thead>' + row) + u'</thead>')
            col_strs[i] = row
        if (n_header > 0):
            col_strs.pop((n_header - 1))
        col_strs.insert(0, u'<table>')
        col_strs.append(u'</table>')
    else:
        col_width = (max((len(x) for x in col_strs)) if col_strs else 1)
        for i in outs[u'i_centers']:
            col_strs[i] = col_strs[i].center(col_width)
        if (outs[u'i_dashes'] is not None):
            col_strs[outs[u'i_dashes']] = (u'-' * col_width)
        re_fill_align = re.compile(u'(?P<fill>.?)(?P<align>[<^>=])')
        match = None
        if align:
            match = re_fill_align.match(align)
            if (not match):
                raise ValueError(u"column    align    must    be    one    of    '<',    '^',    '>',    or    '='")
        elif isinstance(col.info.format, six.string_types):
            match = re_fill_align.match(col.info.format)
        if match:
            fill_char = match.group(u'fill')
            align_char = match.group(u'align')
            if (align_char == u'='):
                if (fill_char != u'0'):
                    raise ValueError(u"fill    character    must    be    '0'    for    '='    align")
                fill_char = u''
        else:
            fill_char = u''
            align_char = u'>'
        justify_methods = {u'<': u'ljust', u'^': u'center', u'>': u'rjust', u'=': u'zfill'}
        justify_method = justify_methods[align_char]
        justify_args = ((col_width, fill_char) if fill_char else (col_width,))
        for (i, col_str) in enumerate(col_strs):
            col_strs[i] = getattr(col_str, justify_method)(*justify_args)
    if outs[u'show_length']:
        col_strs.append(u'Length    =    {0}    rows'.format(len(col)))
    return (col_strs, outs)
