def group_sed_in_gor(): reader = list(csv.reader(open('sed.csv'))) return group_regions(regions, group_words(lst.transpose(reader)))
def transpose_word(word): "[{str:[float]}] -> [[{str:float}]]" def transpose_segment(seg): return [dict(zip(seg.keys(), ns)) for ns in lst.transpose(seg.values())] return lst.transpose(map(transpose_segment, word))
def transpose_segment(seg): return [dict(zip(seg.keys(), ns)) for ns in lst.transpose(seg.values())]
def stringify(zipped): print zipped return '\n'.join('c(%s)' % ','.join(map(str,ns)) for ns in transpose(zipped.values()))