title: Pandas Groupby Range of Values
body: <p>Is there an easy method in pandas to invoke <code>groupby</code> on a range of values increments? For instance given the example below can I bin and group column <code>B</code> with a <code>0.155</code> increment so that for example, the first couple of groups in column <code>B</code> are divided into ranges between '0 - 0.155, 0.155 - 0.31 ...`</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  df=pd.DataFrame({'A':np.random.random(20),'B':np.random.random(20)})
  
       A         B
  0  0.383493  0.250785
  1  0.572949  0.139555
  2  0.652391  0.401983
  3  0.214145  0.696935
  4  0.848551  0.516692
  </code></pre>
  
  <p>Alternatively I could first categorize the data by those increments into a new column and subsequently use <code>groupby</code> to determine any relevant statistics that may be applicable in column <code>A</code>?</p>