packages/vaex-core/vaex/dataframe.py
def rename_column(self, name, new_name, unique=False, store_in_state=True):
        """Renames a column, not this is only the in memory name, this will not be reflected on disk"""
        new_name = vaex.utils.find_valid_name(new_name, used=[] if not unique else list(self))
        data = self.columns.get(name)
        if data is not None:
            del self.columns[name]
            self.column_names[self.column_names.index(name)] = new_name
            self.columns[new_name] = data
        else:
            expression = self.virtual_columns[name]
            del self.virtual_columns[name]
            self.virtual_columns[new_name] = expression
        if store_in_state:
            self._renamed_columns.append((name, new_name))
        for d in [self.ucds, self.units, self.descriptions]:
            if name in d:
                d[new_name] = d[name]
                del d[name]
        return new_name
def rename_column(self, name, new_name, unique=False, store_in_state=True):
        """Renames a column, not this is only the in memory name, this will not be reflected on disk"""
        new_name = vaex.utils.find_valid_name(new_name, used=[] if not unique else list(self))
        data = self.columns.get(name)
        if data is not None:
            del self.columns[name]
            self.column_names[self.column_names.index(name)] = new_name
            self.columns[new_name] = data
        else:
            expression = self.virtual_columns[name]
            del self.virtual_columns[name]
            self.virtual_columns[new_name] = expression
        if store_in_state:
            self._renamed_columns.append((name, new_name))
        for d in [self.ucds, self.units, self.descriptions]:
            if name in d:
                d[new_name] = d[name]
                del d[name]
        return new_name
def rename_column ( self , name , new_name , unique = False , store_in_state = True ) : new_name = vaex . utils . find_valid_name ( new_name , used = [ ] if not unique else list ( self ) ) data = self . columns . get ( name ) if data is not None : del self . columns [ name ] self . column_names [ self . column_names . index ( name ) ] = new_name self . columns [ new_name ] = data else : expression = self . virtual_columns [ name ] del self . virtual_columns [ name ] self . virtual_columns [ new_name ] = expression if store_in_state : self . _renamed_columns . append ( ( name , new_name ) ) for d in [ self . ucds , self . units , self . descriptions ] : if name in d : d [ new_name ] = d [ name ] del d [ name ] return new_name
Renames a column, not this is only the in memory name, this will not be reflected on disk
Renames a column not this is only the in memory name this will not be reflected on disk