title: Pandas: need to count the number of values of a column between 0 and 0.001 then 0.001 and 0.002 etc
body: <p>My code so far looks like this:</p>
  
  <pre><code>conn = psycopg2.connect("dbname=monty user=postgres host=localhost password=postgres")
  cur = conn.cursor()
  cur.execute("SELECT * FROM binance.zrxeth_ob_indicators;")
  row = cur.fetchall()
  df = pd.DataFrame(row,columns=['timestamp', 'topAsk', 'topBid', 'CPA', 'midprice', 'CPB', 'spread', 'CPA%', 'CPB%'])
  ranges = (0, 0.05, 0.1, 0.15 ,0.2, 0.25, 0.3, 0.35, 0.4)
  all_onbservations = df['CPA%'].groupby(pd.cut(df['CPA%'], ranges)).count()
  </code></pre>
  
  <p>I can count them for a specific range but not for an incremental one (between 0 to 0.001 then 0.001 to 0.002 to infinite)... any idea?</p>