title: Sorting API response with python to excel or csv. Python
body: <p>I'm trying to sort out  UK Police free API response to a readable format-csv or excel. 
  Im using Requests library. My initial code is getting the response in a json format:</p>
  
  <pre><code>import requests
  
  r=requests.get('https://data.police.uk/api/crimes-street/all-crime?poly=51.169,-0.633:51.186,-0.5436:51.226,-0.6224&amp;date=2019-12')
  r_json=r.json()
  for i in j:
      for key,value in i.items():
          print (key, ":", value)
  </code></pre>
  
  <p><strong>The code above produces as follows:</strong></p>
  
  <pre><code>category : anti-social-behaviour location_type : Force location : {'latitude': '51.196818', 'street': {'id': 1147343, 'name': 'On or near Parking Area'}, 'longitude': '-0.605146'} context :  outcome_status : None persistent_id :  id : 79955592 location_subtype :  month : 2019-12
  </code></pre>
  
  <p>How can I create a table with correct headers for the response I get? Headers would be  'category',  'latitude', 'street', 'name', 'longitude', ' month'. </p>