title: Create a dictionary from groupby object,Python
body: <p>Suppose i have a dataframe:</p>
  
  <pre><code>df = pd.DataFrame({'Type' : ['Pokemon', 'Pokemon', 'Bird', 'Pokemon', 'Bird', 'Pokemon', 'Pokemon', 'Bird'],'Name' : ['Jerry', 'Jerry', 'Flappy Bird', 'Mudkip','Pigeon', 'Mudkip', 'Jerry', 'Pigeon']})  
  </code></pre>
  
  <p>and i group it according to the type:  </p>
  
  <pre><code>print df.groupby(['Type','Name'])['Type'].agg({'Frequency':'count'})
  
                             Frequency
  Type    Name                  
  Bird    Flappy Bird          1
          Pigeon               2
  Pokemon Jerry                3
          Mudkip               2
  </code></pre>
  
  <p>Could i create a dictionary from the above group ?? The <strong>key</strong> <code>"Bird"</code> will have a value of list containing <code>['Pigeon',Flappy Bird']</code> note that <strong>higher frequency name</strong> should appear <strong>first</strong> in the <strong>Value list</strong>.</p>
  
  <p><strong>Expected Output:</strong></p>
  
  <pre><code>dict1 = { 'Bird':['Pigeon','Flappy Bird'] , 'Pokemon':['Jerry','Mudkip'] }
  </code></pre>