This PR adds a new pattern that I hope to leverage more in the future. The method shift is added to DataFrame. Series is able to also use this functionality simply by using an adaptor, rather than needing its own implementation. The adaptor converts the Series to a single column DataFrame, runs the desired method, and then retrieves the resulting DataFrame and converts it back to a Series.
This PR adds a new pattern that I hope to leverage more in the future. The method
shift
is added to DataFrame. Series is able to also use this functionality simply by using an adaptor, rather than needing its own implementation. The adaptor converts the Series to a single column DataFrame, runs the desired method, and then retrieves the resulting DataFrame and converts it back to a Series.