Created
December 27, 2019 15:28
-
-
Save ShaneLee/19190f89703aa70110cc0f433118a584 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
def get_portfolio(): | |
with open('portfolio.json', 'r') as portfolio_file: | |
portfolio_json = portfolio_file.read() | |
return json.loads(portfolio_json)['portfolio'] | |
portfolio_data = get_portfolio() | |
portfolio = pd.DataFrame(portfolio_data).assign(returns = [get_data(stock) for stock in portfolio_data]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment