I want to:
1-import a column of tickers with the number of 88 in excel file
2-get the data of historical price for these list of tickers
3-export the data back to excel
My problem:
filename=r'C:\Users\User\Desktop\data.xlsx'
yeah = pd.read_excel(filename, sheet_name='entry')
stock = []
stock = list(yeah['stock_name'])
print(stock)
Please check below link of photo shown my error [1]: https://i.stack.imgur.com/kizuW.png
How can I remove all these \xa0 and nan
? and making it workable for the next step?
symbol_list=[stock]
for symbol in symbol_list:
symbol_adj_close[symbol] = web.get_data_yahoo([symbol],start,end)['Adj Close']
print(symbol)
Thanks!