Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pandas as pd
- from pandas_datareader import data as web
- import numpy as np
- tickers={'stock':['AAPL', 'GOOGL', 'TSLA'], 'quantity': [50, 100,300]}
- df=pd.DataFrame(tickers)
- stock_prices=web.DataReader(['AAPL', 'GOOGL', 'TSLA'], data_source='yahoo', start='2017-01-01', end='2020-01-01')['Close']
- #add an empy column
- stock_prices["Ptf_Value"] = ""
Advertisement
Add Comment
Please, Sign In to add comment