title: Pandas: Multiple rolling periods
body: <p>I would like to get multiple rolling period means and std for several columns simultaneously.</p>
  
  <p>This is the code I am using for rolling(5):</p>
  
  <pre><code>def add_mean_std_cols(df):
      res = df.rolling(5).agg(['mean','std'])
  
      res.columns = res.columns.map('_'.join)
  
      cols = np.concatenate(list(zip(df.columns, res.columns[0::2], res.columns[1::2])))
  
      final = res.join(df).loc[:, cols]
      return final
  </code></pre>
  
  <p>I would like to the get rolling (5), (15), (30), (45) periods on the same operation.</p>
  
  <p>I thought about iterating over periods but do not know how to avoid getting the rolling mean/std of the rolling mean/std...</p>