I have a dictionary that looks like this:
{u'results': [{u'bucket': u'Table',
u'data': [{u'Geography_dst': u'PE',
u'avg_bps': 5054970470.588235,
u'device': u'taco',
u'as': u'Telephone Company',
u'next_hop': u'Telephone Companu',
u'key': blah,
u'max_bps': 6613494000,
u'p95th_bps': 6280622000,
u'timeSeries': {}},
[truncated for brevity]
I can't seem to figure out how to parse this dictionary into a csv. I am having trouble figuring out how to make a column out of each key in the 'data' tuple and have the rows populate from the appropriate values:
device,as,nexthop,Geography_dst,max_bps,p95th_bps,avg_bps
(and yeah, I'd prefer not to have the 'key' or the timeseries tuples in the csv at all, but I figure that will be apparent once I figure out how to work with this data structure).
Thanks!