1
我有一个熊猫数据帧如下转换熊猫据帧到字典中使用多列的关键
From_email,To_email,email_count
[email protected],[email protected],1
[email protected],[email protected],1
"<""[email protected]""[email protected]@enron.com>",[email protected],1
我想将其更改为以下格式
hrc_dict = {('[email protected]', '[email protected]'): 1,
('[email protected]', '[email protected]'): 1,
('<"[email protected]"[email protected]@enron.com>', '[email protected] '): 1}
的字典是什么做到这一点的最佳方式?
谢谢。有效。 – AJV
@AJV如果这有效,请考虑将其标记为帮助后来偶然发现的人的答案。 – Suever