So I'm trying to learn more about APIs and the different ways I can use them. Say that as of right now I have
import requests, json, pprint
r = requests.get("values from api")
pprint.pprint(r.json())
which returns to me the following
> {'currentResultCount': '10',
> 'results': [{'Name': 'Item_One',
> 'Price': '464086'},
> {'Name': 'Item_Two',
> 'Price': '70874',
> and so on.........
If I want to store all the price in an array and do some data analysis on them (like find the mean, median, and mode), what should I do?
I tried calling r[0] to see if it's functional or not, but apparantly r is an response object type, so r[0] doesn't work. This is my first time learning about API and data manipulation, any suggestions and learning tips are greatly appreciated!