title: Pandas: calculate average number of rows per user per day
body: <p>I have a <code>Pandas DataFrame</code> which has a <code>DATE</code> column and a <code>userid</code> column like so:</p>
  
  <pre><code>    userid      DATE
  0   vDKE27PF6z  2016-05-26
  1   z6XJewg04Y  2016-05-25
  2   e5Fsyak59l  2016-05-25
  3   7SaYpGRtMI  2016-05-25
  4   KGmTH0XOMz  2016-05-25
  </code></pre>
  
  <p>There are many distinct <code>DATE</code> values and for each <code>DATE</code> a particular <code>userid</code> can appear twice. For each date, I'd like to calculate the number of rows that correspond to that <code>DATE</code> divided by the  number of unique <code>userid</code> values that appear for a given <code>DATE</code>. What's the best way to do this? I've tried various permutations of <code>groupby</code>, but these don't go where I want to be.</p>