Created
September 22, 2020 08:08
-
-
Save yuyasugano/5e7c1b22558a7abc205d8e5b9abee93c to your computer and use it in GitHub Desktop.
Pandas Datareader for single stock data and downsampling
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
df_['Close'].resample('W').ohlc().head() | |
df_['Volume'].resample('W').mean().head() | |
df = pd.concat([df['Close'].resample('W').ohlc(), df['Volume'].resample('W').mean()], axis=1) | |
df.head() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment