Report Helpers

Contains helper functions for generating report.

dataprofiler.profilers.helpers.report_helpers.calculate_quantiles(num_quantile_groups: int, quantiles: Dict[int, int]) Dict[int, int]

Calculate and return quantiles.

Parameters
  • num_quantile_groups (int) – number of quantile groups

  • quantiles (Dict[int, int]) – original quantiles

Returns

calculated quantiles

Return type

Dict[int, int]

dataprofiler.profilers.helpers.report_helpers.flat_dict(od: Dict, separator: str = '_', key: str = '') Dict

Flatten nested dictionary.

Each level is collapsed and joined with the specified seperator.

Parameters
  • od (dict) – dictionary or dictionary-like object

  • seperator (str) – character(s) joining successive levels

  • key (str) – concatenated keys

Returns

unnested dictionary

Return type

dict