Skip to content

Instantly share code, notes, and snippets.

@quantra-go-algo
Created July 21, 2023 12:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save quantra-go-algo/be4f31b18fcc6418643a12662daa2f54 to your computer and use it in GitHub Desktop.
Save quantra-go-algo/be4f31b18fcc6418643a12662daa2f54 to your computer and use it in GitHub Desktop.
df = AAPL_data[['Open', 'High', 'Low', 'Close']].copy()
df['open']=AAPL_data['Open'].shift(1)
df['high']=AAPL_data['High'].shift(1)
df['low']=AAPL_data['Low'].shift(1)
df['close']=AAPL_data['Close'].shift(1)
df=df.dropna()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment