I'm learning Python and decided to play around a bit with a project that I've been wanting to tackle for a while now. I ended up trying to use an API that returns data that I would like to write to a CSV file. I'm struggling with how to parse that out given the formatting of the data, though. I used the following lines to grab the data in question. How can I take that data (shortened version shown below the code) and parse that into a CSV file?
from pycoingecko import CoinGeckoAPI
import pandas as pd
cg = CoinGeckoAPI()
data = cg.get_coin_market_chart_by_id('bitcoin', 'usd', 'max')
print(data)
{'prices': [[1367107200000, 135.3], [1367193600000, 141.96], [1367280000000, 135.3], [1367366400000, 117.0], [1367452800000, 103.43], [1367539200000, 91.01], [1367625600000, 111.25], [1367712000000, 116.79], [1367798400000, 118.33], [1367884800000, 106.4], [1367971200000, 112.64]]}