title: Timeseries stacking in python
body: <p>Hi I want to stack time series per a year.</p>
  <p><a href="https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2021JB022650" rel="nofollow noreferrer">https://agupubs.onlinelibrary.wiley.com/doi/10.1029/2021JB022650</a></p>
  <p>This is the paper I read and at fig 5, they did annual stack (about the fig 5, they referred as &quot;Each subplot of Figure 5 includes the annual stacks of normalized data&quot;).
  <a href="https://i.stack.imgur.com/nSsts.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/nSsts.jpg" alt="enter image description here" /></a></p>
  <p>I have  timeseries as below for two years and want to do the job in python.</p>
  <pre><code>2011-01-01 0.034
  2011-01-02 -0.234
  ...
  2012-12-30 0.363
  2012-12-31 0.092
  </code></pre>
  <p>So I think I have to divide the timeseries from 2011 year and 2012 year and stack the two timeseries. However, I could not figure out the way to stack timeseries.</p>
  <p>What code I have to use for stacking annually?</p>