rows = [{'col1': 'data1a', 'col2': 'data2a'}, {'col1': 'data1b', 'col2':
    'data2b'}]
name_map = {'col1': 'newcol1', 'col2': 'newcol2'}
new_rows = [dict(zip(map(lambda x: name_map[x], list(r.keys())), list(r.values()))) for
    r in rows]
How do I re-map python dict keys