Q:

How to find if the keys within two nested dictionaries match? 

Objective of the project : 
Compare an input to a pre-existing index and return the closest match in term or letters frequencies. 
Basically the desired output would do in the comparison function with an index like this:   
 index = {'nino': {'n': '0.50', 'o': '0.25', 'i': '0.25'}, 
         'pablo': {'l': '0.20', 'p': '0.20', 'o': '0.20', 'b': '0.20', 'a': '0.20'}}

and compare it with the input string from which I would calculate the letters frequencies as well to return a similar output, the letters frequencies: 
{'y': '0.20', 'k': '0.20', 'o': '0.20', 'c': '0.20', 'r': '0.20'}

Once I have that, I would iterate through both dictionaries and check for each item what letters are present.  
Once they are present, I would compare the frequencies in the word and attribute points, then compare the results and return the one that scores most points.  
I have had no trouble with the end of the code.  
However what I can not seem to get right is the iteration between the two dictionaries and their nested elements( the value is a dictionary after all:
I have tried the two sets  approach and then getting the union of both sets but then I am unable to the next part: It says that set are immutable.  
Then I tried adapting code from an answer I found here: 
python dictionary match key values in two dictionaries
Then I tried this option inspired from the answer above:   
if all(string_index[k] == v for k, v in index.items() if k in index):

But then I get a key error, rocky (first key), which tells me that somewhere it is not iterating and comparing what I want it to compare. 
And there I am stuck in the iteration part.  
Once I get it right I know I can finish it. 
Thanks very much for any hint or tips! 
index={}
#Get frequency of a letter

def frequency_return(string,letter):
    count=0

    for letters in string:
       if letters==letter:
           count+=1
    return count

#Scan all letters: if a letter has not been searched then count
def get_frequency(string):
  range_string=string
  length_string=len(string)
  datastore={}
  target=0
  frequency=0
  while len(range_string)!=0:
           # datastore.append(range_string[target])
            frequency = (int(frequency_return(range_string,range_string[target]))/length_string)
            frequency = format(frequency, '.2f')
            datastore.update({range_string[target]:frequency})
            range_string = range_string.replace(range_string[target],'')
  return datastore          

def index_string(string):

    if string not in index:

      index.update({string: (get_frequency(string))})
    return index

index_string("pablo")
index_string("rocky")
index_string("rigo")
index_string("nino")

print (index)

###############################################################################################

def comparator (string, index):
  string_index=get_frequency(string)
  result={}
  if all(string_index[k] == v for k, v in index.items() if k in index):
    result.update(string_index)
  return result

print(comparator("baobab", index))

A:

It's not quite clear what your desired output is, but I've had a go at sorting it out. 
First of all, we can tidy up your calculation of letter proportions for each word by simply using a Counter:
from collections import Counter

def get_proportions(word):
    frequencies = dict(Counter(word))
    for letter, value in frequencies.items():
        frequencies[letter] = float(value)/len(word)
    return frequencies

A Counter returns the number of times it finds each letter in the word.  To get this into proportions, we simply divide each value by the length of the word.  To demonstrate this in use, if we do:
comparison_dict = {}
for word in ['pablo', 'rocky', 'rigo', 'nino']:
    comparison_dict[word] = get_proportions(word)

print(comparison_dict)

We print out:
{'rigo': {'i': 0.25, 'r': 0.25, 'g': 0.25, 'o': 0.25}, 'rocky': {'y': 0.2, 'c': 0.2, 'r': 0.2, 'k': 0.2, 'o': 0.2}, 'nino': {'i': 0.25, 'o': 0.25, 'n': 0.5}, 'pablo': {'a': 0.2, 'p': 0.2, 'b': 0.2, 'l': 0.2, 'o': 0.2}}

The final part of your code I assume is aiming to work out some kind of "distance" between a provided word and each word in the comparison dictionary?  I've assumed you want the total difference between the given word's letter values and the dictionary word's letter values, which gives the following function:
def compare_to_dict(word, compare_to):
    props = get_proportions(word)
    comparison_scores = []
    for key in compare_to.keys():
        word_distance = sum(abs(props.get(letter, 0) - compare_to[key].get(letter, 0))
                            for letter in set(word + key))
        comparison_scores.append((key, word_distance))
    return sorted(comparison_scores, key=lambda x: x[1])

For each letter in the given word and dictionary word, we calculate the (absolute) difference between the proportions for the two words - i.e. if our given word is 'baobab' and our dictionary word is 'rigo', the letter r contributes 0.25 (0.25-0) while the letter o contributes 0.083333 (0.25 - 0.0166666).  We sort this according to the total of these differences, so the first entry in our returned list is the "closest" word in the dictionary to our given word. 
For example, if we print(compare_to_dict('baobab', comparison_dict)) we get:
[('pablo', 0.8666666666666666), ('rigo', 1.6666666666666665), ('rocky', 1.6666666666666665), ('nino', 1.6666666666666665)]

suggesting that 'pablo' is the closest word to 'baobab'. 
I'm not sure if this is exactly what you're after, so please let me know if it isn't.  Full code is as follows:
from collections import Counter

def get_proportions(word):
    frequencies = dict(Counter(word))
    for letter, value in frequencies.items():
        frequencies[letter] = float(value) / len(word)
    return frequencies

def compare_to_dict(word, compare_to):
    props = get_proportions(word)
    comparison_scores = []
    for key in compare_to.keys():
        word_distance = sum(abs(props.get(letter, 0) - compare_to[key].get(letter, 0))
                            for letter in set(word + key))
        comparison_scores.append((key, word_distance))
    return sorted(comparison_scores, key=lambda x: x[1])

comparison_dict = {}
for word in ['pablo', 'rocky', 'rigo', 'nino']:
    comparison_dict[word] = get_proportions(word)

print(comparison_dict)

print(compare_to_dict('baobab', comparison_dict))

