if data.status_code == 200:
data = data.json()
final_dataframe = final_dataframe.append(
pd.Series(
[stock, data['latestPrice'], data['marketCap'], 'N/A'],
index = mycolumns
),
ignore_index = True
)
else:
print(f'An error occurred, status code: {data.status_code}')