

def AddColumn(self, column, default='', col_index=(- 1)):
    "Appends a new column to the table.\n\n    Args:\n      column: A string, name of the column to add.\n      default: Default value for entries. Defaults to ''.\n      col_index: Integer index for where to insert new column.\n\n    Raises:\n      TableError: Column name already exists.\n\n    "
    if (column in self.table):
        raise TableError(('Column %r already in table.' % column))
    if (col_index == (- 1)):
        self._table[0][column] = column
        for i in xrange(1, len(self._table)):
            self._table[i][column] = default
    else:
        self._table[0].Insert(column, column, col_index)
        for i in xrange(1, len(self._table)):
            self._table[i].Insert(column, default, col_index)

dataset/ETHPy150Open google/textfsm/texttable.py TextTable.AddColumn/original