How do I make it so that when I go through this loop, the data frame is updated each time with the new price data?
import time
import pandas as pd
import pycoingecko
cg = pycoingecko.CoinGeckoAPI()
for i in range(10):
df = pd.DataFrame(cg.get_coin_ticker_by_id(id='bitcoin').get('tickers'))
time.sleep(2)