title: Missing data in Python
body: <p>I'm trying to import a JSON file into Python to do some data analysis. Each JSON object has a lot of different variables in it (about 7-10). Some objects have certain variables, while other objects don't. I am interested in specifically five variables from each json line. However, some objects have missing data. How do I make it so that the program will put a None for every missing data?</p>
  
  <pre><code>import json
  data = []
  keys = ["hostid","time", "userid","link", "title"]
  m = len(keys)
  
  with open('test.json') as json_data:
      for line in json_data:
          dataline = json.loads(line)
          row = []
          for i in xrange(m):
              row.append(dataline[keys[i]])
          data.append(row)
  json_data.close()
  
  data = np.array(data)
  </code></pre>
  
  <p>Here are some sample JSON objects. As you can see the first object has all five variables that I want, but the second object does not have data for the "title" variable.</p>
  
  <pre><code>{
  "title": "Monster Man", 
  "link": "http://monsters4ever.com/tagged/rosemary%27s%20baby%20(1968)",
  "userid": 130290, 
  "field5": "lezmer Brunch at City Winery? Who Knew? -- Grub Street Chicago\"", 
  "hostid": "3969937ab0a3e2db8690c482564006a7", 
  "time": 376541
  }
  
  {
  "link": "http://www.sfgate.com/world/article/WORLD-News-of-the-Day-From-Across-the-Globe-4120318.php", 
  "userid": 227954, "field5": "ries &amp;laquo; SHEfinds\"", 
  "hostid": "6096407936827c96fa0833f26ab33b76", 
  "time": 376541
  }
  </code></pre>
  
  <p>Can someone please help me?</p>