title: How to find the range intervals of column with count & compare its values?
body: <p>Below is my demo dataframe:</p>
  <pre><code>df=pd.DataFrame({&quot;a&quot;: np.random.randint(1, high=50, size=50)})
  bins =np.arange(0,df['a'].max()+1,5).astype('int') # this range interval with 5 
  </code></pre>
  <p>when i run below func i get range and its count like this.</p>
  <pre><code>df.a.value_counts(bins=bins,sort=False)
  
  (-0.001, 5.0]     3
  (5.0, 10.0]       2
  (10.0, 15.0]      5
  (15.0, 20.0]      3
  (20.0, 25.0]      5
  (25.0, 30.0]     10
  (30.0, 35.0]      6
  (35.0, 40.0]      6
  (40.0, 45.0]      4
  </code></pre>
  <p>what i want is when i will give range say <code>[20:50]</code> it will return the maximum count between it .</p>
  <p>Here it is <code>10</code> also i want to know it is within <code>[25:30]</code>. Also if possible real values between it or mean of it.</p>