title: "Bin labels must be one fewer than the number of bin edges" after passing pd.qcut duplicates='drop' kwarg
body: <p>I have a <code>df</code> with hundreds of thousands of rows, and am creating a new dataframe which only contains the top quantile of rows for some group of values:</p>
  
  <pre><code>quantiles = (df.groupby(['Person', 'Date'])['Value'].apply(lambda x: pd.qcut(x, 4, labels=[0, 0.25, 0.5, 1], duplicates='drop')))
  </code></pre>
  
  <p>When I run it, I get:</p>
  
  <pre><code>ValueError: Bin labels must be one fewer than the number of bin edges
  </code></pre>
  
  <p>After trying to change the number of <code>bins</code> to <code>5</code> I still get the same error. </p>
  
  <p>How can I fix this? </p>