+
+ def extractfrommod(self, col, val):
+ return ([''] + self.colnames) + [line for line in self.csvtable[1:] if line[col + 1] == val]
+
+ def splitfromvar(self, col):
+ newtabs = {}
+ for line in self.csvtable[1:] :
+ mod = line[col+1]
+ if mod in newtabs :
+ newtabs[mod].append(line)
+ else :
+ newtabs[mod] = [line]
+ for mod in newtabs :
+ newtabs[mod].insert(0, [''] + self.colnames)
+ return newtabs