'Replace column ``name`` with the new ``col`` object.
Parameters
name : str
Name of column to replace
col : column object (list, ndarray, Column, etc)
New column object to replace the existing column
Examples
Replace column \'a\' with a float version of itself::
>>> t = Table([[1, 2, 3], [0.1, 0.2, 0.3]], names=(\'a\', \'b\'))
>>> float_a = t[\'a\'].astype(float)
>>> t.replace_column(\'a\', float_a)'

def replace_column(self, name, col):

    if (name not in self.colnames):
        raise ValueError(u'column    name    {0}    is    not    in    the    table'.format(name))
    if self[name].info.indices:
        raise ValueError(u'cannot    replace    a    table    index    column')
    t = self.__class__([col], names=[name])
    cols = OrderedDict(self.columns)
    cols[name] = t[name]
    self._init_from_cols(cols.values())
