(no title)
mrocklin | 10 years ago
In [1]: data = [{'a': {'b': 1}}, {'a': {'c': 2}}]
In [2]: from toolz import merge, merge_with
In [3]: merge_with(merge, data) Out[3]: {'a': {'b': 1, 'c': 2}}
You'd have to be a bit clever to go fully recursive
mrocklin | 10 years ago
In [1]: data = [{'a': {'b': 1}}, {'a': {'c': 2}}]
In [2]: from toolz import merge, merge_with
In [3]: merge_with(merge, data) Out[3]: {'a': {'b': 1, 'c': 2}}
You'd have to be a bit clever to go fully recursive
No comments yet.