title: Use python to divide data into different intervals (intervals are based on another column value)
body: <p>For example, this is data table:</p>
  
  <pre><code>1.1       300 
  1.5       200
  1.7       234
  2.4       356
  2.8       234
  3.4       456
  </code></pre>
  
  <p>I want to put values in the 2nd column into corresponding intervals, like first three to 1.0-2.0 interval, next two to 2.0-3.0 interval, last one to 3.0-4.0 interval. Besides this, in each interval, I like to return the value that is larger than bottom 90% values but smaller than top 10% values in the corresponding interval  (Assuming there are many numbers in each interval in real case). </p>
  
  <p>What I want to output is a new table that has 2 columns: 1st column is the middle value of the interval boundary, 2nd column is the value that is mentioned in the last paragraph. The output for the example data table is: </p>
  
  <pre><code>1.5    300
  2.5    356 
  3.5    456 
  </code></pre>
  
  <p>Thanks! </p>