def add_variable(self, name, expression, overwrite=True, unique=True):
if unique or overwrite or name not in self.variables:<EOL><INDENT>existing_names = self.get_column_names(virtual=False) + list(self.variables.keys())<EOL>name = vaex.utils.find_valid_name(name, used=[] if not unique else existing_names)<EOL>self.variables[name] = expression<EOL>self.signal_variable_changed.emit(self, name, "<STR_LIT>")<EOL>if unique:<EOL><INDENT>return name<EOL><DEDENT><DEDENT>
Add a variable to to a DataFrame.

        A variable may refer to other variables, and virtual columns and expression may refer to variables.

        Example

        >>> df.add_variable('center', 0)
        >>> df.add_virtual_column('x_prime', 'x-center')
        >>> df.select('x_prime < 0')

        :param: str name: name of virtual varible
        :param: expression: expression for the variable