def convert_uncertainty_types_to_integers(db):
    'Generic number conversion function convert to floats. Return to integers.'
    for ds in db:
        for exc in ds['exchanges']:
            try:
                exc['uncertainty type'] = int(exc['uncertainty type'])
            except:
                pass
    return db
Generic number conversion function convert to floats. Return to integers.
def convert_uncertainty_types_to_integers(db):
    
    for ds in db:
        for exc in ds['exchanges']:
            try:
                exc['uncertainty type'] = int(exc['uncertainty type'])
            except:
                pass
    return db