(self, variable, data, to_metas=None)
return new_table
Create a new table with an additional column

        Column's name must be unique

        Args:
            variable (Variable): variable for the new column
            data (np.ndarray): data for the new column
            to_metas (bool, optional): if `True` the column is added as meta
                column. Otherwise, primitive variables are added to attributes
                and non-primitive to metas.

        Returns:
            table (Table): a new table with the additional column
Create a new table with an additional column
Create a new table with an additional column
def add_column(self, variable, data, to_metas=None):
        """
        Create a new table with an additional column

        Column's name must be unique

        Args:
            variable (Variable): variable for the new column
            data (np.ndarray): data for the new column
            to_metas (bool, optional): if `True` the column is added as meta
                column. Otherwise, primitive variables are added to attributes
                and non-primitive to metas.

        Returns:
            table (Table): a new table with the additional column
        """
        dom = self.domain
        attrs, classes, metavars = dom.attributes, dom.class_vars, dom.metas
        to_metas = to_metas or not variable.is_primitive()
        if to_metas:
            metavars += (variable, )
        else:
            attrs += (variable, )
        domain = Domain(attrs, classes, metavars)
        new_table = self.transform(domain)
        with new_table.unlocked(new_table.metas if to_metas else new_table.X):
            new_table.get_column_view(variable)[0][:] = data
        return new_table
def add_column ( self , variable , data , to_metas = None ) : dom = self . domain attrs , classes , metavars = dom . attributes , dom . class_vars , dom . metas to_metas = to_metas or not variable . is_primitive ( ) if to_metas : metavars += ( variable , ) else : attrs += ( variable , ) domain = Domain ( attrs , classes , metavars ) new_table = self . transform ( domain ) with new_table . unlocked ( new_table . metas if to_metas else new_table . X ) : new_table . get_column_view ( variable ) [ 0 ] [ : ] = data return new_table