def _collapse_attributes(self, line, header, indexes):
names = []<EOL>vals = []<EOL>pat = re.compile("<STR_LIT>")<EOL>for i in indexes:<EOL><INDENT>names.append(pat.sub("<STR_LIT:_>", self._clean_header(header[i])))<EOL>vals.append(line[i])<EOL><DEDENT>Attrs = collections.namedtuple('<STR_LIT>', names)<EOL>return Attrs(*vals)<EOL>
Combine attributes in multiple columns into single named tuple.