title: write a list of ordered dictionaries to a csv file in python
body: <p>After reading a CSV file using</p>
  
  <pre><code>with open(filename, 'r') as f:
    reader = csv.DictReader(f)
    for line in reader:
      date = line['Date']
  </code></pre>
  
  <p>each line is an OrderedDict</p>
  
  <pre><code>OrderedDict([
      ('Date', '2008-03-20'), 
      ('Name', 'Some name'),...)
  ])
  </code></pre>
  
  <p>I would like to write this list of ordered dictionaries to a csv file in python using the keys of the first dictionary in the list as the column header.</p>