title: How to compute volatility (standard deviation) in rolling window in Pandas
body: <p>I have a time series &quot;Ser&quot; and I want to compute volatilities (standard deviations) with a rolling window. My current code correctly does it in this form:</p>
  <pre><code>w = 10
  for timestep in range(length):
      subSer = Ser[timestep:timestep + w]
      mean_i = np.mean(subSer)
      vol_i = (np.sum((subSer - mean_i)**2) / len(subSer))**0.5
      volList.append(w_i)
  </code></pre>
  <p>This seems to me very inefficient. Does Pandas have built-in functionality for doing something like this?</p>