title: Pandas: after using qcut(data,3), how to find the range of the quantile
body: <p>My data looks like this:</p>
  
  <pre><code>    spread                              CPB%    Bin  
  0  0.00000787  0.001270648030495552731893265565   B  
  1  0.00000785  0.003821656050955414012738853503   A  
  2  0.00000749  0.005821656050955414012738853503   C  
  3  0.00000788  0.004821656050955414012738853503   B
  </code></pre>
  
  <p>So I have basically assigned a letter A,B or C according to the value of their spread. I have done this using this code:</p>
  
  <pre><code>s = (df['spread'] * 10**15).astype(np.int64)
  df['Bin'] = pd.qcut(s, 3, labels=list('ABC'))
  </code></pre>
  
  <p>What I need to do now, is that I have 100 spreads (from 0.000001 to 0.0001) and I need to know if they end-up in the Bin A,B or C. Is there a way to find let's say the 'range' of the above quantile? </p>
  
  <p>More precisely I have the below spreads:</p>
  
  <pre><code>      spread
  0   0.000100
  1   0.000109
  2   0.000118
  3   0.000127
  4   0.000136
  5   0.000145
  </code></pre>
  
  <p>How can I know if they end-up in the same bin as A-B-C of above? Thanks</p>