'Constructs a schema row decoder.'

def __init__(self, header):

    for (p, val_type) in self.REQUIRED_COLUMNS:
        try:
            if val_type:
                setattr(self, p, val_type(header.index(p)))
            else:
                setattr(self, p, header.index(p))
        except ValueError:
            raise ValueError(('A    column    named    "%s"    must    exist    in    the    schema    file.' % p))
