title: Rolling mean of Time series Pandas
body: <p>I am trying to learn about rolling statistics. I created a data frame for :</p>
  
  <pre><code>d = date_range('1/1/2011', periods=72, freq='H')
  s = Series(randn(len(rng)), index=rng)
  </code></pre>
  
  <p>as :</p>
  
  <pre><code>import numpy as np
  from numpy.random import randn
  import time
  r = date_range('1/1/2011', periods=72, freq='H')
  r
  len(r)
  [r[i] for i in range(len(r))]
  s = Series(randn(len(r)), index=r)
  s
  s.plot()
  df_new = DataFrame(data = s, columns=['Random Number Generated'])
  df_new.diff().hist()
  </code></pre>
  
  <p>Now I am trying to find the rolling mean of the series over the last 3 hours in a new column on a DataFrame. I tried to find the rolling mean first:</p>
  
  <pre><code>df_new['mean'] = rolling_mean(df_new, window=3)
  </code></pre>
  
  <p>Am I correct ? But the result doesn't look like mean. Can someone explain me this one please. </p>