Last active
May 3, 2020 07:20
-
-
Save anbento0490/60b0ee553e13cacd98dbd63c1ff78753 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stocks['Lag1'] = stocks.groupby('Symbol')['Adj Close'].shift(-1) | |
stocks['Lag7'] = stocks.groupby('Symbol')['Adj Close'].shift(-7) | |
stocks.head(20) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment