title: pandas groupby and convert to json list
body: <p>I have a pandas dataframe like the following</p>
  
  <pre><code>idx, f1, f2, f3
  1,   a,  a,  b
  2,   b,  a,  c
  3,   a,  b,  c
  .
  .
  .
  87   e,  e,  e
  </code></pre>
  
  <p>I need to convert the other columns to list of dictionaries based on idx column. so, final result should be:</p>
  
  <pre><code>idx, features
  1 ,  [{f1:a, f2:a, f3:b}, {f1:b, f2:a, f3:c}, {f1:a, f2:b, f3:c}]
  .
  .
  .
  87,  [{f1: e, f2:e, f3:e}]
  </code></pre>
  
  <p>Is it possible to do something like this using groupby in pandas?</p>