'Add a new Column object ``col`` to the table.  If ``index``
is supplied then insert column before ``index`` position
in the list of columns, otherwise append column to the end
of the list.
Parameters
col : Column
Column object to add.
index : int or `None`
Insert column before this position or at end (default).
name : str
Column name
rename_duplicate : bool
Uniquify column name if it already exist. Default is False.
Examples
Create a table with two columns \'a\' and \'b\'::
>>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3]], names=(\'a\', \'b\'))
>>> print(t)
a   b
1 0.1
2 0.2
3 0.3
Create a third column \'c\' and append it to the end of the table::
>>> col_c = Column(name=\'c\', data=[\'x\', \'y\', \'z\'])
>>> t.add_column(col_c)
>>> print(t)
a   b   c
1 0.1   x
2 0.2   y
3 0.3   z
Add column \'d\' at position 1. Note that the column is inserted
before the given index::
>>> col_d = Column(name=\'d\', data=[\'a\', \'b\', \'c\'])
>>> t.add_column(col_d, 1)
>>> print(t)
a   d   b   c
1   a 0.1   x
2   b 0.2   y
3   c 0.3   z
Add second column named \'b\' with rename_duplicate::
>>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3]], names=(\'a\', \'b\'))
>>> col_b = Column(name=\'b\', data=[1.1, 1.2, 1.3])
>>> t.add_column(col_b, rename_duplicate=True)
>>> print(t)
a   b  b_1
1 0.1 1.1
2 0.2 1.2
3 0.3 1.3
Add an unnamed column or mixin object in the table using a default name
or by specifying an explicit name with ``name``. Name can also be overridden::
>>> t = Table([[1, 2], [0.1, 0.2]], names=(\'a\', \'b\'))
>>> col_c = Column(data=[\'x\', \'y\'])
>>> t.add_column(col_c)
>>> t.add_column(col_c, name=\'c\')
>>> col_b = Column(name=\'b\', data=[1.1, 1.2])
>>> t.add_column(col_b, name=\'d\')
>>> print(t)
a   b  col2  c   d
1 0.1    x   x 1.1
2 0.2    y   y 1.2
To add several columns use add_columns.'

def add_column(self, col, index=None, name=None, rename_duplicate=False):

    if (index is None):
        index = len(self.columns)
    if (name is not None):
        name = (name,)
    self.add_columns([col], [index], name, rename_duplicate=rename_duplicate)
