angelorcc

Untitled

Feb 19th, 2020
177
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.36 KB | None | 0 0
  1. import pandas as pd
  2. from pandas_datareader import data as web
  3. import numpy as np
  4.  
  5. tickers={'stock':['AAPL', 'GOOGL', 'TSLA'], 'quantity': [50, 100,300]}
  6. df=pd.DataFrame(tickers)
  7. stock_prices=web.DataReader(['AAPL', 'GOOGL', 'TSLA'], data_source='yahoo', start='2017-01-01', end='2020-01-01')['Close']
  8. #add an empy column
  9.  
  10. stock_prices["Ptf_Value"] = ""
Advertisement
Add Comment
Please, Sign In to add comment