title: pandas.IntervalIndex.mid for half open IntervalIndex
body: <p>I have to deal with Series with an half open interval as index, like this one:</p>
  
  <pre><code>import pandas as pd
  
  index = pd.interval_range(5,50,9, closed='left')
  values = [8, 8, 14, 4, 6, 12, 8, 3, 2]
  
  s = pd.Series(values, index)
  s
  </code></pre>
  
  <p><em>output</em>:</p>
  
  <pre><code>[5, 10)      8
  [10, 15)     8
  [15, 20)    14
  [20, 25)     4
  [25, 30)     6
  [30, 35)    12
  [35, 40)     8
  [40, 45)     3
  [45, 50)     2
  dtype: int64
  </code></pre>
  
  <p>I want to automatically compute the <strong>midpoint</strong> and use it behind the scene for computations.</p>
  
  <p>If I use the <code>pandas.IntervalIndex.mid</code> function that, according to the documentation, "<em>returns the midpoint of each Interval in the IntervalIndex as an Index</em>" I get:</p>
  
  <pre><code>Float64Index([7.5, 12.5, 17.5, 22.5, 27.5, 32.5, 37.5, 42.5, 47.5], dtype='float64')
  </code></pre>
  
  <p>The problem is that my interval is <code>closed='left'</code>, so the output I was expecting is:</p>
  
  <pre><code>Float64Index([7., 12., 17., 22., 27., 32., 37., 42., 47.], dtype='float64')
  </code></pre>
  
  <p>If the interval was <code>closed='right'</code>, I expect:</p>
  
  <pre><code>Float64Index([8., 13., 18., 23., 28., 33., 38., 43., 48.], dtype='float64')
  </code></pre>
  
  <p>Is there a way to automatically get the half point for an open or half open interval <strong>without having to specify an offset</strong> for the values returned by <code>pandas.IntervalIndex.mid</code>? For the Series used in the example the offset would be -0.5.</p>