title: Write Python OrderedDict to CSV
body: <p>I have an ordered dictionary that, as one would expect, contains a number of key-value pairs.  I need to parse the contents of the ordered dictionary into CSV format, with the keys in the top row and their respective values in the second row.  I've got the first row down, but I'm at a loss as to how to write the second row.  The values in the OrderedDict are what you'd expect (what it looks like printed out in the terminal): <code>([(a, 1), (b, 2), (c, 3)])</code>. Here's what I have:</p>
  
  <pre><code>import csv
  with open("frequencies.csv", "w") as outfile:
      csvwriter = csv.writer(outfile)
      csvwriter.writerow(myDict)
  </code></pre>
  
  <p>I tried iterating over the values and appending them to a list, but the list didn't maintain the original order of the ordered dictionary, which, as far as I could tell, would have made it pretty difficult to print the values from the list to the CSV so that they'd match up with the correct keys.</p>
  
  <p>Thanks in advance for your help!</p>