I need a method where I can merge two dicts keeping the max value when one of the keys, value are in both dicts.
dict_a maps \"A\", \"B\", \"C\" to 3, 2, 6
dict_
If you know that all your values are non-negative (or have a clear smallest number), then this oneliner can solve your issue:
a = dict(a=3,b=2,c=6)
b = dict(b=7,c=4,d=1)
merged = { k: max(a.get(k, 0), b.get(k, 0)) for k in set(a) | set(b) }
Use your smallest-possible-number instead of the 0. (E. g. float('-inf') or similar.)