def get_nested_value(d, key):
 if ('.' not in key):
  if (key not in d):
   return None
  return d[key]
 (base_key, sub_key) = key.split('.', 1)
 if (base_key not in d):
  return None
 sub_dict = d[base_key]
 return get_nested_value(sub_dict, sub_key)

def get_nested_value ( d , key ) : if ( '.' not in key ) : if ( key not in d ) : return None return d [ key ] ( base_key , sub_key ) = key . split ( '.' , 1 ) if ( base_key not in d ) : return None sub_dict = d [ base_key ] return get_nested_value ( sub_dict , sub_key )
return a dictionary item given a dictionary d and a flattened key from get_column_names .