title: Writing to a CSV file with dict keys as column names
body: <p>I have data in the format of dicts as follows:</p>
  
  <pre><code>{Color: Red, Age: 29, Date: October 2nd, Time: 4pm}
  </code></pre>
  
  <p>And I want to write these dicts to a csv in such a way that the "Color, age, date, time" are the column titles, and the fields get filed in as the rows. That way, when I read the csv file again, I get the data formatted in the same way mentioned above.</p>
  
  <p>What is the proper way to go about this?</p>