title: convert grouped dataframe to dictionary with apply/lambda
body: <p>I have a df like this</p>
  
  <pre><code>     A   B       C
  0   11  one      5
  1   11  two      7
  2   11  three    9
  3   22  one      11
  4   22  two      13
  </code></pre>
  
  <p>I'd like to convert this df to dictionary like this:</p>
  
  <pre><code>{11: [(one, 5), (two, 7), (three, 9)]
   22: [(one, 11), (two, 13)]} 
  
  
  df_dict = df.groupby('A').apply(lambda y: {(x.B, x.C) for i, x in y.iterrows()})
  </code></pre>
  
  <p>The actual results I got from this code:</p>
  
  <pre><code>11    {(one, 5), (two, 7), (three, 9)}
  22    {(one, 11), (two, 13)} 
  </code></pre>