title: Rolling Mean with upcoming values - Python 3, Pandas
body: <p>This is my first question related to python/Panda. I'm a beginner, but I'll try to explain my hopefully easy question. I love the rolling window function and use it like this for now to calculate the mean:</p>
  
  <pre><code>import pandas as pd
  import random as r
  
  d = [r.random() for i in range(0,100)]
  df = pd.DataFrame(d, columns=['Values'])
  df['rolling mean'] = df['Values'].rolling(30).mean()
  </code></pre>
  
  <p>df['Values'] is a column with random floats (for test purposes). It is intended to write the rolling mean value of the column "Values" into the column "rolling mean". This works perfectly! It's pretty cool and super efficient for now. But I wonder if it is possible to consider something like future values (outside the window). </p>
  
  <p><strong>So my question is:</strong></p>
  
  <blockquote>
    <p>Is there a simple and <strong>efficient</strong> way to calculate the mean value
    with the coming / future values of the rolling column?</p>
  </blockquote>
  
  <p>Something like: </p>
  
  <pre><code>&gt;  ( t-1 + t0 + t+1 ) / 3
  </code></pre>
  
  <p>Thank you, I have tried to find a solution in the API and on SO, but as a beginner of a language it is always difficult to find the right place for information. </p>
  
  <p>David </p>