standardize_scenarios_dict_keys#

pymc_marketing.mmm.utils.standardize_scenarios_dict_keys(d, keywords)[source]#

Standardize the keys in a dictionary based on a list of keywords.

This function iterates over the keys in the dictionary and the keywords. If a keyword is found in a key (case-insensitive), the key is replaced with the keyword.

Parameters:
  • d (dict) – The dictionary whose keys are to be standardized.

  • keywords (list) – The list of keywords to standardize the keys to.

Returns:

The function modifies the given dictionary in-place and doesn’t return any object.

Return type:

None