I want to iteratively create multiple dataframes from a list of ticker names.
Here is the stack overflow post i'm referencing:
Stack Overflow Post - Iteratively Create Multiple Dataframes
I'm having trouble understanding how to accomplish this, i feel like i'm missing or misunderstanding something here?
I wrote up the following list and dictionary
list_of_tickers = ['BAC','C','GS','JPM','MS','WFC']
dict_of_tickers = {name: pd.DataFrame() for name in list_of_tickers}
However when i run this portion of the code i get the following error:
for ticker, ticker_data in dict_of_tickers.items():
ticker_data = data.DataReader(ticker,'yahoo',start,end)
This creates one single dataframe of all tickers but doesn't allow me to distinguish between them, i feel like i'm missing some key logic here.