Transformer les touches du dictionnaire Python
def rename_keys(d, trafo_dic):
return dict([(trafo_dic.get(k), v) for k, v in d.items()])
Real Raccoon
def rename_keys(d, trafo_dic):
return dict([(trafo_dic.get(k), v) for k, v in d.items()])