title: Nested JSON to Pandas Dataframe in python
body: <p>I'm trying to convert nested JSON data into a pandas dataframe. I know there is ample material on here about this but I still can't seem to get this working.
  As you can see, I created a dataframe with the intent of grabbing only certain pieces of data (bedrooms, price, size, longitude, latitude).</p>
  
  <p>Any help is appreciated.</p>
  
  <p>Code below:</p>
  
  <pre><code>import json
  import requests
  import datetime
  import pandas as pd
  from pandas.io.json import json_normalize
  from urllib.request import urlopen
  import json
  import urllib.request, json 
  
  end_page = 42
  
  df = pd.DataFrame()#columns='Bedrooms','Price','Size','Longitude','Latitude')
  
  for page in range(1,end_page+1):
  
      with urllib.request.urlopen("https://www.rentfaster.ca/api/search.json?proximity_type=location-city&amp;novacancy=0&amp;city_id=" + str(page)) as url:
  
          data = json.loads(url.read().decode())
  
  
          for x in data['listings']:
              for y in x['bedrooms'] and x['sq_feet']:
                  print(y)
  </code></pre>