1
辞書のリストに同じキーがあり、すべての値をすべてのキーのリストに集約したいという問題に取り組んでいます。Pandas Groupby辞書の辞書一覧
x = [
{'firstName': 'Tom', 'lastName': 'Fyre', 'email': '[email protected]'},
{'firstName': 'Jerry', 'lastName': 'Brat', 'email': '[email protected]'},
{'firstName': 'Phil', 'lastName': 'Hughes', 'email': '[email protected]'}
]
私がどのように見える1つの辞書に辞書のリストの上に変換したい:
results = {
'firstName': ['Tom', 'Jerry', 'Phil'],
'lastName': ['Fyre', 'Brat', 'Hughes'],
'email': ['[email protected]', '[email protected]', '[email protected]']
}