title: Add columns to a rolling-apply function
body: <p>I have <code>daily_data</code> data like this:</p>
  <pre><code>                 Close
  Date
  2022-06-01  148.710007
  2022-05-31  148.839996
  2022-05-27  149.639999
  2022-05-26  143.779999
  2022-05-25  140.520004
  2022-05-24  140.360001
  2022-05-23  143.110001
  2022-05-20  137.589996
  2022-05-19  137.350006
  2022-05-18  140.820007
  ...
  </code></pre>
  <p>I then do a rolling percent change calculation, <code>sampleStr</code> = '180 D':</p>
  <pre><code>dfSeries = daily_data['Close'].rolling(resampleStr).apply(lambda x : (x[0] - x[-1])/x[0])
  </code></pre>
  <p>If I print this I get this:</p>
  <pre><code>Date
  2022-06-01    0.000000
  2022-05-31   -0.000874
  2022-05-27   -0.006254
  2022-05-26    0.033152
  2022-05-25    0.055074
  2022-05-24    0.056150
  2022-05-23    0.037657
  2022-05-20    0.074776
  2022-05-19    0.076390
  2022-05-18    0.053056
  2022-05-17   -0.003564
  2022-05-16    0.021317
  2022-05-13    0.010759
  2022-05-12    0.041356
  2022-05-11    0.014861
  2022-05-10   -0.039002
  </code></pre>
  <p>However, I would like to add <code>columns</code> to this for a sanity check, I would like to add the Date of <code>x[0]</code> (actually this is already there I think), the Date of <code>x[-1]</code>, the Close of <code>x[0]</code>, and the Close of <code>x[-1]</code>, to <code>dfSeries</code>.</p>
  <p>How do I do this?</p>