nickmccullum / algorithmic-trading-python

The repository for freeCodeCamp's YouTube course, Algorithmic Trading in Python
2.43k stars 2.42k forks source link

section ## Looping Through The Tickers in Our List of Stocks. Issue: TypeError: string indices must be integers #29

Open eduardo152030 opened 2 years ago

eduardo152030 commented 2 years ago

Hi team. Can you please help me out. What I have done wrongly ?

image

my code: my_columns = ['Ticker', 'Stock Price', 'Market Capitalization'] final_dataframe = pd.DataFrame(columns = my_columns) for stock in stocks['Ticker'][:5]: print(stock)

can you please tell me why I have the TypeError: string indices must be integers Best.