I have multiple python dictionaries, each having multiple values. I want to write them in csv files.Dictionaries are of the kind:
dict1='198': Counter({'65': 9.561,
'92': 7.845,
'22': 5.994}),
dict2={'613': {},
'201': {'5351': ['-'],
'7': ['+'],
'16': ['+'],
'43': ['*'],
'41': ['*'],
'9026': ['+']}}
dict3={'200': [('*',
'https://m.instantmess.com//stream.php?story_id=2137751112'),
('+', '-'),
('*',
'https://m.instantmess.com//stream.php?story_id=213655363'),
('*',
'https://m.instantmess.com//stream.php?story_id=2133332333'),
)]
Output Format Required:
1842 ('*', 'https://m.instantmess.com//stream.php?id=1443556433') 88 + 0.97
The first value from dict3
will act as a primary key.
How to add them in a single csv file.
I have tried these answers:
Write Python dictionary with multiple values to CSV
Writing multiple Python dictionaries to csv file
But my case is of multiple dictionaries with multiple values. How to solve it?