title: Aggregate unique values from multiple columns with pandas GroupBy
body: <p>I went into countless threads (<a href="https://stackoverflow.com/questions/47434426/pandas-groupby-unique-multiple-columns">1</a> <a href="https://stackoverflow.com/questions/36106490/how-to-get-unique-values-from-multiple-columns-in-a-pandas-groupby">2</a> <a href="https://stackoverflow.com/questions/19556165/how-can-i-drop-duplicate-data-in-a-single-column-group-wise-in-pandas">3</a>...) and still I don't find a solution to my problem...
  I have a dataframe like this:</p>
  
  <pre><code>prop1 prop2 prop3    prop4 
  L30   3     bob      11.2
  L30   54    bob      10
  L30   11    john     10
  L30   10    bob      10
  K20   12    travis   10 
  K20   1     travis   4 
  K20   66    leo      10
  </code></pre>
  
  <p>I would like to do a groupby on prop1, AND at the same time, get all the other columns aggregated, but only with unique values. Like that:</p>
  
  <pre><code>prop1  prop2       prop3       prop4
  L30    3,54,11,10  bob,john    11.2,10
  K20    12,1,66     travis,leo  10,4
  </code></pre>
  
  <p>I tried with different methods:</p>
  
  <ol>
  <li><code>df.groupby('prop1')['prop2','prop3','prop4'].apply(np.unique)</code>
  returns </li>
  </ol>
  
  <blockquote>
    <p>AttributeError: 'numpy.ndarray' object has no attribute 'index'
    PLUS TypeError: Series.name must be a hashable type</p>
  </blockquote>
  
  <ol start="2">
  <li><p>Also: <code>.apply(lambda x: pd.unique(x.values.ravel()).tolist())</code> which gives a list as output, and I would like columns.</p></li>
  <li><p><code>df.groupby('prop1')['prop2','prop3','prop4'].unique()</code> by itself doesn't work because there are multiple columns.</p></li>
  <li><p><code>.apply(f)</code> with f being:</p>
  
  <p><code>def f(df):
     df['prop2']=df['prop2'].drop_duplicates()
     df['prop3']=df['prop3'].drop_duplicates()
     df['prop4']=df['prop4'].drop_duplicates()
     return df</code></p></li>
  </ol>
  
  <p>doesn't do anything.</p>
  
  <ol start="5">
  <li>I also tried to use <code>.agg()</code> with different options but didn't get success.</li>
  </ol>
  
  <p>Does one of you would have any idea?</p>
  
  <p>Thank you very much :)</p>