I want find similarity rating between dictionary keys in Python

  data-analysis, dictionary, python, similarity

In python:
I have a dictionary of 1000 products like this:


I now have 20.000 old shopping orders (dictionary) that look like this:



Each order has different number of unique products (100-200 products)

For each order I have the time it took to gather all products:


When I recieve a new order, I want to find the MOST SIMILAR order (or the 5 most similar) from the orders dictionary so I can predict the time I will need to gather the products

ex. I get a new_order={"p3":480,"p14":1800,…,"p780":170}

How much time will I need to gather all the products for this order?

Source: Python Questions