title: Python JSON list to get data and retrieve column name
body: <p>I am a Python beginner. I'm accessing a historical metal prices api that returns a dictionary of lists.  The first item in the list is the column names, and the rest is data that falls under those column headers.</p>
  <p>I'm trying to write code that will return the Date and Cash Buyer values for all dates on record.</p>
  <p>Here's what I've written so far.  I've tried several dictionary and list methods and have not been able to get this to work.</p>
  <p>The URL is purposefully restricted to 1 row (rows=1) for this posting and stripped of my API key.  However, this URL will work for anyone but is rate limited without an API key:</p>
  <pre><code>import urllib
  import json
  url = &quot;https://www.quandl.com/api/v1/datasets/LME/PR_CU.json?rows=1&quot;
  response = urllib.urlopen(url)
  data = json.loads(response.read())
  </code></pre>
  <p>Here's a sample output as is:</p>
  <pre><code>{
  &quot;code&quot;: &quot;PR_CU&quot;,
  &quot;column_names&quot;: [
      &quot;Date&quot;,
      &quot;Cash Buyer&quot;,
      &quot;Cash Seller &amp; Settlement&quot;,
      &quot;3-months Buyer&quot;,
      &quot;3-months Seller&quot;,
      &quot;15-months Buyer&quot;,
      &quot;15-months Seller&quot;,
      &quot;Dec 1 Buyer&quot;,
      &quot;Dec 1 Seller&quot;,
      &quot;Dec 2 Buyer&quot;,
      &quot;Dec 2 Seller&quot;,
      &quot;Dec 3 Buyer&quot;,
      &quot;Dec 3 Seller&quot;
  ],
  &quot;data&quot;: [
      [
          &quot;2016-10-14&quot;,
          4672.0,
          4672.5,
          4691.0,
          4692.0,
          4730.0,
          4740.0,
          null,
          null,
          null,
          null,
          null,
          null
      ]
  ],
  &quot;description&quot;: &quot;LME Official Prices i
  &quot;display_url&quot;: null,
  &quot;errors&quot;: {},
  &quot;frequency&quot;: &quot;daily&quot;,
  &quot;from_date&quot;: &quot;2012-01-03&quot;,
  &quot;id&quot;: 19701916,
  &quot;name&quot;: &quot;Copper Prices&quot;,
  &quot;premium&quot;: false,
  &quot;private&quot;: false,
  &quot;source_code&quot;: &quot;LME&quot;,
  &quot;source_name&quot;: &quot;London Metal Exchange&quot;
  &quot;to_date&quot;: &quot;2016-10-14&quot;,
  &quot;type&quot;: null,
  &quot;updated_at&quot;: &quot;2016-10-17T07:05:00.54
  &quot;urlize_name&quot;: &quot;Copper-Prices&quot;
  }
  </code></pre>