I've had a look around but no other thread seems to quite answer the specific challenge I'm facing.
For example, this thread tells me how to write a list of dictionaries to CSV.
This one explains how to write a dictionary when the value for each key is a list.
I have a list of dictionaries that I need to write to CSV where only one of the values is a list. For example:
[{
'name': 'name_1',
'id': 'id_1',
'info': [{
'info_1': 'some info',
'info_2': 'more info'
},
{
'info_1': 'all the info',
'info_2': 'extra info'
}]
},
{
'name': 'name_2',
'id': 'id_2',
'info': [{
'info_1': 'another piece of info the same type as info_1 above',
'info_2': 'info'
},
{
'info_1': 'getting tedious',
'info_2': 'you get the picture...'
}
]
}]
Output headers are: name, id, info_1, info_2