I have written some simple code to iterate through a group of lists I am analyzing, and I discovered this error – module ‘numpy’ has no attribute ‘concat’, in this case would there be a solution?
`
The stocks we’ll use for this analysis
tech_list = [‘AMZN’, ‘NVDA’, ‘VOO’, ‘QQQ’]
Set up End and Start times for data grab
tech_list = [‘AMZN’, ‘NVDA’, ‘VOO’, ‘QQQ’]
end = datetime.now()
start = datetime(end.year – 1, end.month, end.day)
for stock in tech_list:
globals()[stock] = yf.download(stock, start, end)
company_list = [AMZN, NVDA, VOO, QQQ]
company_name = [“AMAZON”, “NVIDIA”, “Vanguard S&P 500”, “Invesco QQQ”]
for company, com_name in zip(company_list, company_name):
company[“company_name”] = com_name
df = pd.concat(company_list, axis=0)
df.tail(10)
AttributeError: module ‘numpy’ has no attribute ‘concat’
`
André Freitas is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.