Report Helpers

Contains helper functions for generating report.

dataprofiler.profilers.helpers.report_helpers.calculate_quantiles(num_quantile_groups: int, quantiles: dict) dict

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