def gen_gene_vals(cols, table_contents):
    for row in table_contents:
        d = dict(zip(cols, row))
        d['is_hgnc'] = bool(d['is_hgnc'] != '0')
        if d['rvis_pct'] in (None, 'None'):
            d['rvis_pct'] = None
        else:
            d['rvis_pct'] = float(d['rvis_pct'])
        if "in_cosmic_census" in d:
            d['in_cosmic_census'] = bool(d['in_cosmic_census'])

        yield d
dataset/ETHPy150Open arq5x/gemini/gemini/database.py/gen_gene_vals/original