ENH: .shift optionally takes multiple periods
Taking over from https://github.com/pandas-dev/pandas/pull/44660/files

- [x] closes #44424
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/v2.1.0.rst` file if fixing a bug or adding a new feature.

I think the pyarrow failure is unrelated? Otherwise green. Ok now it's all green. All green! @rhshadrach @mroeschke I originally wanted this functionality to build simple Almon distributed lags models (or the [corresponding thing from cognitive neuroscience](https://mne.tools/dev/auto_examples/stats/linear_regression_raw.html)), would there be a room for a Pandas docs example for this? Basically showing how an impulse response function can be recovered via regression of a multi-lagged feature.

E: maybe this PR isn't the space for this, I can also move to an issue Done - @rhshadrach everything ok from your end? Thanks @jona-sassenhagen! Great work! Thanks @rhshadrach !

May I re-raise this: https://github.com/pandas-dev/pandas/pull/54115#issuecomment-1649676735 > May I re-raise this: [#54115 (comment)](https://github.com/pandas-dev/pandas/pull/54115#issuecomment-1649676735)

I recommend making an issue. There a few places that come to my mind:

 - An example in the User Guide
 - [The cookbook](https://pandas.pydata.org/docs/user_guide/cookbook.html)
 - [The ecosystem](https://pandas.pydata.org/community/ecosystem.html)

A user guide example would need to be (a) self-contained and (b) not too long to be appropriate; the cookbook should be for generic operations (no domain context); and the ecosystem for packages. I'm not sure exactly what you're thinking of, but it sounds like it may not fit in any of these. But we can discuss further in an issue. Thanks, I will do that.