From ce3b232328ad8fcfb321419ec74fa6cec465a66d Mon Sep 17 00:00:00 2001 From: Lei Yan Date: Wed, 5 Feb 2014 15:09:38 -0600 Subject: On branch master --- wqflask/maintenance/dataset/utilities.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wqflask/maintenance/dataset/utilities.py b/wqflask/maintenance/dataset/utilities.py index 76d81f5e..30e135cb 100644 --- a/wqflask/maintenance/dataset/utilities.py +++ b/wqflask/maintenance/dataset/utilities.py @@ -25,3 +25,14 @@ def to_dic(keys, values): value = values[i] dic[key] = value return dic + +def overlap(dic1, dic2): + keys = [] + values1 = [] + values2 = [] + for key in dic1.keys(): + if key in dic2: + keys.append(key) + values1.append(dic1[key]) + values2.append(dic2[key]) + return keys, values1, values2 -- cgit v1.2.3