API Call- Statistics Sweden
<p>I am trying to access the following API URL and convert it into a Pandas DataFrame:</p>

<p><a href="http://api.scb.se/OV0104/v1/doris/sv/ssd/START/BE/BE0101/BE0101A/BefolkningR1860" rel="nofollow">http://api.scb.se/OV0104/v1/doris/sv/ssd/START/BE/BE0101/BE0101A/BefolkningR1860</a></p>

<p>My goal is to read this JSON file into a pandas data frame and display years as index and the population of Sweden as values.</p>

<p>These are the values for each year:</p>

<pre><code>- 2012: 9 555 893 
- 2013: 9 644 864
- 2014: 9 747 355
</code></pre>

<p>My solution looks like this so far:</p>

<pre><code>import pandas as 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'])
</code></pre>

<p>I have identified the years, but not sure how to access the values.</p>

<p>Thank you in advance for your support.</p>