(self, coldata)
return coldata
Paste new cols, overwrites existing names
Paste new cols, overwrites existing names
Paste new cols overwrites existing names
def pasteColumns(self, coldata):
        """Paste new cols, overwrites existing names"""

        M = self.model
        for name in coldata:
            if name not in M.columnNames:
                M.addColumn(name)
            for r in range(len(coldata[name])):
                val = coldata[name][r]
                col = M.columnNames.index(name)
                if r >= self.rows:
                    break
                M.setValueAt(val, r, col)
        self.redrawTable()
        return coldata
def pasteColumns ( self , coldata ) : M = self . model for name in coldata : if name not in M . columnNames : M . addColumn ( name ) for r in range ( len ( coldata [ name ] ) ) : val = coldata [ name ] [ r ] col = M . columnNames . index ( name ) if r >= self . rows : break M . setValueAt ( val , r , col ) self . redrawTable ( ) return coldata