combine_dict_list#

caf.toolkit.toolbox.combine_dict_list(dict_list, operation)[source]#

Combine a list of dictionaries.

Parameters:
  • dict_list (list[dict[Any, Any]]) – A list of dictionaries to sum together.

  • operation (Callable) – the operation to use to combine values at keys. The operator library defines functions to do this. Function should take two values, and return one.

Returns:

A single dictionary of all the dicts in dict_list summed together.

Return type:

summed_dict