python - API Call- Statistics Sweden -


i trying access following api url , convert pandas dataframe:

http://api.scb.se/ov0104/v1/doris/sv/ssd/start/be/be0101/be0101a/befolkningr1860

my goal read json file pandas data frame , display years index , population of sweden values.

these values each year:

- 2012: 9 555 893  - 2013: 9 644 864 - 2014: 9 747 355 

my solution looks far:

import pandas pd  url = 'http://api.scb.se/ov0104/v1/doris/sv/ssd/start/be/be0101/be0101a/befolkningr1860'  df = pd.read_json(url)  print(df['variables'][3]['valuetexts']) 

i have identified years, not sure how access values.

thank in advance support.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -