title: Iterate over list of dict and group item by key
body: <p>I have a list of dicts:</p>
  
  <pre><code>my_list = [
      {'name': 'AAA', 'date': '2018-05-14', 'price': 20.0},
      {'name': 'AAA', 'date': '2018-05-15', 'price': 22.0},
      {'name': 'AAA', 'date': '2018-05-16', 'price': 30.0},
      {'name': 'BBB', 'date': '2018-05-14', 'price': 15.0},
      {'name': 'BBB', 'date': '2018-05-15', 'price': 32.0}
      ]
  </code></pre>
  
  <p>My question is how can I iterate over that list to produce a list in this format?</p>
  
  <pre><code>parsed_list = [
      {'name': 'AAA', 'data': [['2018-05-14', 20.0], ['2018-05-15', 22.0], ['2018-05-16', 30.0]]},
      {'name': 'BBB', 'data': [['2018-05-14', 15.0], ['2018-05-15', 32.0]]}
      ]
  </code></pre>
  
  <p>I tried approach described in this question: <a href="https://stackoverflow.com/questions/31071888/python-group-list-items-in-a-dict">Python: group list items in a dict</a>
  but I need a different output format and I can't figure out what I need to change.</p>