title: Pandas Groupby Unique Multiple Columns
body: <p>I have a dataframe.</p>
  
  <pre><code>import pandas as pd
  df = pd.DataFrame(           
  {'number': [0,0,0,1,1,2,2,2,2], 'id1': [100,100,100,300,400,700,700,800,700], 'id2': [100,100,200,500,600,700,800,900,1000]})
  
     id1   id2  number
  0  100   100       0
  1  100   100       0
  2  100   200       0
  3  300   500       1
  4  400   600       1
  5  700   700       2
  6  700   800       2
  7  800   900       2
  8  700  1000       2
  </code></pre>
  
  <p>(This represents a much larger dataframe I am working with ~millions of rows).</p>
  
  <p>I can apply a <code>groupby().unique</code> to one column:</p>
  
  <pre><code>df.groupby(['number'])['id1'].unique()
  
  number
  0         [100]
  1    [300, 400]
  2    [700, 800]
  Name: id1, dtype: object
  
  df.groupby(['number'])['id2'].unique()
  
  number
  0               [100, 200]
  1               [500, 600]
  2    [700, 800, 900, 1000]
  Name: id2, dtype: object
  </code></pre>
  
  <p>I want to do the unique over both columns simultaneously to get it ordered in a dataframe:</p>
  
  <pre><code>number
  0               [100, 200]
  1     [300, 400, 500, 600]
  2    [700, 800, 900, 1000]
  </code></pre>
  
  <p>When I try and do this for both columns I get the error:</p>
  
  <pre><code>pd.Data.Frame(df.groupby(['number'])['id1', 'id2'].unique())
  
  Traceback (most recent call last):
    File "C:\Python34\lib\site-packages\IPython\core\interactiveshell.py", line 2885, in run_code
      exec(code_obj, self.user_global_ns, self.user_ns)
    File "&lt;ipython-input-15-bfc6026e241e&gt;", line 9, in &lt;module&gt;
      df.groupby(['number'])['id1', 'id2'].unique()
    File "C:\Python34\lib\site-packages\pandas\core\groupby.py", line 498, in __getattr__
      (type(self).__name__, attr))
  AttributeError: 'DataFrameGroupBy' object has no attribute 'unique'
  </code></pre>
  
  <p>What do? Is it preferable to use a multi-index?</p>
  
  <p>Edit: In addition is it possible to get the output as follows:</p>
  
  <pre><code>number
  0 100
  0 200
  1 300
  1 400
  1 500
  1 600
  2 700
  2 800
  2 900
  2 1000
  </code></pre>