title: How to handle Error "'NoneType' object has no attribute 'keys'", when converting list to DataFrame
body: <p>Trying to create a dataframe from a list but get error 
  "'NoneType' object has no attribute 'keys'"</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  import requests
  import json
  from sklearn import preprocessing
  from sklearn.preprocessing import OneHotEncoder
  
  person = []
  position = []
  skaterstats = []
  person = []
  player_id = {}
   for game_id in range(2018020001, 2018020002, 1):
      url = 'https://statsapi.web.nhl.com/api/v1/game/{}/feed/live'.format(game_id)
      r = requests.get(url)
      game_data = r.json()
  
  for homeaway in ['home','away']:
      player_dict = game_data.get('liveData').get('boxscore').get('teams').get(homeaway).get('skaters')
      player_id[homeaway] = player_dict
  
  for homeaway in player_id:
      for playerID in player_id[homeaway]:
          play_dict_person = game_data.get('liveData').get('boxscore').get('teams').get(homeaway).get('players').get('ID' + str(playerID)).get('person')
          play_dict_position = game_data.get('liveData').get('boxscore').get('teams').get(homeaway).get('players').get('ID' + str(playerID)).get('position')
          play_dict_skaterstats = game_data.get('liveData').get('boxscore').get('teams').get(homeaway).get('players').get('ID' + str(playerID)).get('stats').get('skaterStats')
          person.append(play_dict_person)
          position.append(play_dict_position)
          skaterstats.append(play_dict_skaterstats)
  
  df_person = pd.DataFrame(person).head()
  df_position = pd.DataFrame(position).head()
  df_skaterstats = pd.DataFrame(skaterstats).head()
  
  ----&gt; 3 df_skaterstats = pd.DataFrame(skaterstats).head() 
  
  AttributeError: 'NoneType' object has no attribute 'keys'
  </code></pre>
  
  <p>The error occurs occurs only on this DataFrame, I have checked that the path should be correct and all. Link to the API below if it would to any guidance.</p>
  
  <p>This is the API: <a href="https://statsapi.web.nhl.com/api/v1/game/2017020002/feed/live" rel="nofollow noreferrer">https://statsapi.web.nhl.com/api/v1/game/2017020002/feed/live</a></p>