title: Apply "list" function on multiple columns pandas
body: <p>In order to "concatenate" a few rows to 1 list with groupby in Pandas, I can do this:</p>
  
  <pre><code>df = pd.DataFrame({'A': [1,1,2,2,2,2,3],'B':['a','b','c','d','e','f','g']})
  
  df = df.groupby('A')['B'].apply(list)
  </code></pre>
  
  <p>I will get:</p>
  
  <pre><code>A
  -------------------
  1          [a, b]
  2    [c, d, e, f]
  3             [g]
  </code></pre>
  
  <p>I want to do the same with agg:</p>
  
  <pre><code>f = {"B":[list]}
  df = df.groupby('A').agg(f)
  </code></pre>
  
  <p>that gives errors,
  any idea?</p>
  
  <p>Thanks,</p>