def itemmap(func, d, factory=dict):
    rv = factory()
    rv.update(map(func, iteritems(d)))
    return rv
Apply function to items of dictionary
dataset/ETHPy150Open pytoolz/toolz/toolz/dicttoolz.py/itemmap