code.Cols

 1import re
 2import Sym
 3import Num
 4
 5class Cols:
 6    def __init__(self, names):
 7        self.names=names  # all column names
 8        self.all=[]       # all the columns (including the skipped ones)
 9        self.klass=None   # the single dependent klass column (if it exists)
10        self.x=[]         # independent columns (that are not skipped)
11        self.y=[]         # depedent columns (that are not skipped)
12        
13        for c in range(0, len(names)):
14            s =  re.sub('\n', '' , names[c]) 
15            if s[0].isupper():
16                col = Num.Num(c, s)
17            else:
18                col = Sym.Sym(c, s)
19
20            if s[-1] in ["+", "-", "!"]:
21                self.y.append(col) 
22            else:
23                self.x.append(col)
24            if "!$" in s:
25                self.klass = col
class Cols:
 6class Cols:
 7    def __init__(self, names):
 8        self.names=names  # all column names
 9        self.all=[]       # all the columns (including the skipped ones)
10        self.klass=None   # the single dependent klass column (if it exists)
11        self.x=[]         # independent columns (that are not skipped)
12        self.y=[]         # depedent columns (that are not skipped)
13        
14        for c in range(0, len(names)):
15            s =  re.sub('\n', '' , names[c]) 
16            if s[0].isupper():
17                col = Num.Num(c, s)
18            else:
19                col = Sym.Sym(c, s)
20
21            if s[-1] in ["+", "-", "!"]:
22                self.y.append(col) 
23            else:
24                self.x.append(col)
25            if "!$" in s:
26                self.klass = col
Cols(names)
 7    def __init__(self, names):
 8        self.names=names  # all column names
 9        self.all=[]       # all the columns (including the skipped ones)
10        self.klass=None   # the single dependent klass column (if it exists)
11        self.x=[]         # independent columns (that are not skipped)
12        self.y=[]         # depedent columns (that are not skipped)
13        
14        for c in range(0, len(names)):
15            s =  re.sub('\n', '' , names[c]) 
16            if s[0].isupper():
17                col = Num.Num(c, s)
18            else:
19                col = Sym.Sym(c, s)
20
21            if s[-1] in ["+", "-", "!"]:
22                self.y.append(col) 
23            else:
24                self.x.append(col)
25            if "!$" in s:
26                self.klass = col