title: Pandas Get List of Unique Values in Column A for each Unique Value in Column B
body: <p>I'm finding this problem easy to write out, but difficult to apply with my Pandas Dataframe. 
  When searching for anything 'unique values' and 'list' I only get answers for getting the unique values in a list. </p>
  
  <p>There is a brute force solution with a double for loop, but there must be a faster Pandas solution than n^2.</p>
  
  <p>I have a DataFrame with two columns: Name and Likes Food.</p>
  
  <p>As output, I want a list of unique Likes Food values <em>for each</em> unique Name.</p>
  
  <p>Example Dataframe df</p>
  
  <pre><code>Index        Name       Likes Food
  
  0            Tim        Pizza
  1            Marie      Pizza
  2            Tim        Pasta
  3            Tim        Pizza
  4            John       Pizza
  5            Amy        Pizza
  6            Amy        Sweet Potatoes
  7            Marie      Sushi
  8            Tim        Sushi
  </code></pre>
  
  <p>I know how to aggregate and groupby the unique count of Likes Food:</p>
  
  <pre><code>df.groupby( by='Name', as_index=False ).agg( {'Likes Food': pandas.Series.nunique} )
  df.sort_values(by='Likes Food', ascending=False)
  df.reset_index( drop=True )
  &gt;&gt;&gt;
  Index        Name       Likes Food
  
  0            Tim        3
  1            Marie      2
  2            Amy        2
  3            John       1
  </code></pre>
  
  <p>But given that, what ARE the foods for each Name in that DataFrame? For readability, expressed as a list makes good sense. List sorting doesn't matter (and is easy to fix probably).</p>
  
  <p>Example Output</p>
  
  <pre><code>&lt;code here&gt;
  &gt;&gt;&gt;
  Index        Name       Likes Food    Food List
  
  0            Tim        3             [Pizza, Pasta, Sushi]
  1            Marie      2             [Pizza, Sushi]
  2            Amy        2             [Pizza, Sweet Potatoes]
  3            John       1             [Pizza]
  
  </code></pre>