Returns a dict with new key values.
key_map (dict) – A dictionary that maps the dict keys ({old key: new key}.
dicts (dict) – A sequence of dicts.
copy (bool, optional) – If True, it returns a deepcopy of input values.
base (dict, optional) – Base dict where combine multiple dicts in one.
A unique dict with new key values.
dict
Example:
>>> d = map_dict({'a': 'c', 'b': 'd'}, {'a': 1, 'b': 1}, {'b': 2}) >>> sorted(d.items()) [('c', 1), ('d', 2)]
Table of Contents