Reading/writing a list of nested dictionaries to/from a CSV file (Python)
<p>I have a data structure that looks like this:</p>

<pre><code>data  =[
{'key_1': { 'calc1': 42, 'calc2': 3.142 } },
{'key_2': { 'calc1': 123.4, 'calc2': 1.414 } },
{'key_3': { 'calc1': 2.718, 'calc2': 0.577 } }
]
</code></pre>

<p>I want to be able to save/and load the data into a CSV file with the following format</p>

<pre><code>key,    calc1,   calc2   &lt;- header
key_1,  42,      3.142   &lt;- data rows
key_2,  123.4,   1.414
key_3,  2.718,   0.577
</code></pre>

<p>What's the 'Pythonic' way to read/save this data structure to/from a CSV file like the one above?</p>
