Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

transform dictionary keys python

def rename_keys(d, trafo_dic):
    return dict([(trafo_dic.get(k), v) for k, v in d.items()])
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #transform #dictionary #keys #python
ADD COMMENT
Topic
Name
1+2 =