Skip to content

Instantly share code, notes, and snippets.

@yuyasugano
Created September 22, 2020 08:08
Show Gist options
  • Save yuyasugano/5e7c1b22558a7abc205d8e5b9abee93c to your computer and use it in GitHub Desktop.
Save yuyasugano/5e7c1b22558a7abc205d8e5b9abee93c to your computer and use it in GitHub Desktop.
Pandas Datareader for single stock data and downsampling
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