title: Convert pandas.groupby to dict
body: <p>Consider, dataframe <code>d</code>:</p>
  <pre><code>d = pd.DataFrame({'a': [0, 2, 1, 1, 1, 1, 1],
                    'b': [2, 1, 0, 1, 0, 0, 2],
                    'c': [1, 0, 2, 1, 0, 2, 2]})
  &gt;   a   b   c
  0   0   2   1
  1   2   1   0
  2   1   0   2
  3   1   1   1
  4   1   0   0
  5   1   0   2
  6   1   2   2
  </code></pre>
  <p>I want to split it by column <code>a</code> into dictionary like that:</p>
  <pre><code>{0:    a  b  c
      0  0  2  1,
  
   1:    a  b  c
      2  1  0  2
      3  1  1  1
      4  1  0  0
      5  1  0  2
      6  1  2  2,
  
   2:    a  b  c
      1  2  1  0}
  </code></pre>
  <p>The solution I've found using <code>pandas.groupby</code> is:</p>
  <pre><code>{k: table for k, table in d.groupby(&quot;a&quot;)}
  </code></pre>
  <p>What are the other solutions?</p>