title: In a DataFrame with a sorted, numeric index with duplicates, create a shifted version of existing column and interpolated missing values
body: <p>Having such a Pandas DataFrame <code>df</code> with a sorted, numeric index (representing f.e. time or distance) with possible duplicate values:</p>
  
  <pre><code>     a    b
    0  4.0  1.0
  1.5  5.5  2.5
  1.5  5.5  2.5
    2  6.0  3.0
  4.5  8.5  5.5
  </code></pre>
  
  <p>I would like to create a column <code>c</code>, with values from column <code>a</code> with index shifts that are matching the original index. All index shifts that are not matching the original index should be still taken into account when filling in the original index values that did not get the value assigned, using f.e. linear interpolation.</p>
  
  <p>Example:</p>
  
  <p>Taking 0.5 as an example index shift, column <code>c</code> would be constructed from column <code>a</code> with index values of 0, 0.5, 1.5, 2, 2.5, 4.5 and 5, giving the following intermediate result with the missing values marked below as <code>(i)</code>:</p>
  
  <pre><code>      c
    0  Nan(i)
  0.5  4.0
  1.5  4.75(i)
    2  5.5
  2.5  6.0
  4.5  7.25(i)
    5  8.5
  </code></pre>
  
  <p>The final result should be indexed using the original indexes used in <code>df</code>:</p>
  
  <pre><code>     a    b    c
    0  4.0  1.0  Nan(i)
  1.5  5.5  2.5  4.75(i)
  1.5  5.5  2.5  4.75(i)
    2  6.0  3.0  5.5
  4.5  8.5  5.5  7.25(i)
  </code></pre>
  
  <p>There is a question how to take the value for the duplicate index, in this example one value was chosen, but a mean might be a better appraoch.</p>