I have a list of ticker values
ticker = ["AAPL","MSFT","GOOG"]
and I want to create a DF with "high" values of prices for all the stocks in the ticker list.
Creating an empty DF:
high_df = pd.DataFrame(columns = ticker)
Filling the DF:
import pandas_datareader as web
import datetime
start = datetime.datetime(2010,1,1)
end = datetime.datetime(2010,2,1)
for each_column in high_df.columns:
high_df[each_column] = web.DataReader(each_column, "yahoo",start,end)["High"]
This works but takes a long time if the ticker list is huge. Any other suggestions for approaches to speed up? Speed up with the way the DF is filled.