Here is my code
dataframe = pd.DataFrame(columns = my_columns)
for stock in stocks['Ticker'][:1]:
api_url = f'https://sandbox.iexapis.com/stable/stock/{symbol}/quote/?token={IEX_CLOUD_API_TOKEN}'
data = requests.get(api_url).json()
dataframe = dataframe.append(
pd.Series([stock, data['latestPrice'], marketCap/1000000000000],
index = my_columns),
ignore_index = True
)
dataframe
Returns this BUT!
Ticker | Stock Price | Market Cap |
---|---|---|
A | 153.57 | 2.37218 |
Also returns : FutureWarning: The frame.append method is deprecated and will be removed from pandas in a future version. Use pandas.concat instead. dataframe = dataframe.append(
I understand I want to make dataframe a list but how do I parse through the Series?