title: Python percentile rank of a column, grouped by multiple other columns
body: <p>I would like to group a pandas dataframe by multiple fields ('date' and  'category'), and for each group, rank values of another field ('value') by percentile, while retaining the original ('value') field. </p>
  
  <p>I have attempted:</p>
  
  <pre><code>df2 = df.groupby(['date', 'category'])['value'].rank(pct=True)
  </code></pre>
  
  <p>But this returns only percentiles for the 'value' field.</p>