(self, oldcolumnIndex, newcolumnIndex)
return
Changes the order of columns
Changes the order of columns
Changes the order of columns
def moveColumn(self, oldcolumnIndex, newcolumnIndex):
        """Changes the order of columns"""
        self.oldnames = self.columnNames
        self.columnNames=[]

        #write out a new column names list - tedious
        moved = self.oldnames[oldcolumnIndex]
        del self.oldnames[oldcolumnIndex]
        #print self.oldnames
        i=0
        for c in self.oldnames:
            if i==newcolumnIndex:
                self.columnNames.append(moved)
            self.columnNames.append(c)
            i=i+1
        #if new col is at end just append
        if moved not in self.columnNames:
            self.columnNames.append(moved)
        return
def moveColumn ( self , oldcolumnIndex , newcolumnIndex ) : self . oldnames = self . columnNames self . columnNames = [ ] #write out a new column names list - tedious moved = self . oldnames [ oldcolumnIndex ] del self . oldnames [ oldcolumnIndex ] #print self.oldnames i = 0 for c in self . oldnames : if i == newcolumnIndex : self . columnNames . append ( moved ) self . columnNames . append ( c ) i = i + 1 #if new col is at end just append if moved not in self . columnNames : self . columnNames . append ( moved ) return