title: counting unique value pairs in pandas
body: <p>I have a dataframe like the below:</p>
  
  <pre><code>           place          user     count  item
  2013-06-01 New York       john     2      book
  2013-06-01 New York       john     1      potato
  2013-06-04 San Francisco  john     5      laptop
  2013-06-04 San Francisco  jane     6      tape player
  2013-05-02 Houston        michael  2      computer
  </code></pre>
  
  <p>I'm trying to count the number of unique <code>(date, user)</code> combinations for each <code>place</code> — or, put another way, the number of 'unique visits' to each city. So for 
  <code>New York</code> it would be one, for <code>San Francisco</code> it would be two, and for <code>Houston</code> it would be one.</p>
  
  <p>I've tried doing the below follows:</p>
  
  <p><code>df.groupby([df.index, user, place]).place.size()</code> but that just returns the total <code>count</code> for each place. I feel like I'm missing something really obvious here, but I can't see what it is. Any help?</p>