:py:mod:`rhino_health.lib.metrics.metric_utils` =============================================== .. py:module:: rhino_health.lib.metrics.metric_utils Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: rhino_health.lib.metrics.metric_utils.nested_metric_groups .. py:function:: nested_metric_groups(grouped_metric_results: Dict[Union[Tuple, str], Any]) -> Dict[str, Any] Converts a dictionary of grouped metrics to a nested dictionary .. rubric:: Examples >>> input = {"('F', False)": {'count': 20}, "('F', True)": {'count': 14}, "('M', False)": {'count': 17}, "('M', True)": {'count': 25}} >>> nested_metric_groups(input) {'F': {False: { 'count': 20 }, True: { 'count': 14} }, 'M': {False: { 'count': 17 }, True: { 'count': 25 }}} .. warning:: How groups are represented will likely change in the future and this function will change in future versions .. !! processed by numpydoc !!