ColumnValueSummary¶
- class ColumnValueSummary(sum_op)[source]
Methods
Attributes
|
|
- static ColumnValueSummary.dump_summary(filename, summary)¶
- ColumnValueSummary.get_details_dict(summary)[source]¶
Return a dictionary with the summary contained in a TabularSummary
- Parameters:
summary (TabularSummary) – Dictionary of merged summary information.
- Returns:
Dictionary with the information suitable for extracting printout.
- Return type:
dict
- ColumnValueSummary.get_individual(summary_details, separately=True)¶
- ColumnValueSummary.get_summary(individual_summaries='separate')¶
Return a summary dictionary with the information.
- Parameters:
individual_summaries (str) – “separate”, “consolidated”, or “none”
- Returns:
dict - dictionary with “Dataset” and “Individual files” keys.
- Notes: The individual_summaries value is processed as follows
“separate” individual summaries are to be in separate files
“consolidated” means that the individual summaries are in same file as overall summary
“none” means that only the overall summary is produced.
- ColumnValueSummary.get_summary_details(include_individual=True)¶
Return a dictionary with the details for individual files and the overall dataset.
- Parameters:
include_individual (bool) – If True, summaries for individual files are included.
- Returns:
dict - a dictionary with ‘Dataset’ and ‘Individual files’ keys.
Notes
The ‘Dataset’ value is either a string or a dictionary with the overall summary.
- The ‘Individual files’ value is dictionary whose keys are file names and values are
their corresponding summaries.
Users are expected to provide merge_all_info and get_details_dict to support this.
- ColumnValueSummary.get_text_summary(individual_summaries='separate')¶
- ColumnValueSummary.get_text_summary_details(include_individual=True)¶
- ColumnValueSummary.merge_all_info()[source]¶
Create a TabularSummary containing the overall dataset summary.
- Returns:
TabularSummary - the summary object for column values.
- static ColumnValueSummary.partition_list(lst, n)[source]¶
Partition a list into lists of n items.
- Parameters:
lst (list) – List to be partitioned
n (int) – Number of items in each sublist
- Returns:
list of lists of n elements, the last might have fewer.
- Return type:
list
- ColumnValueSummary.save(save_dir, file_formats=['.txt'], individual_summaries='separate', task_name='')¶
- ColumnValueSummary.update_summary(new_info)[source]¶
Update the summary for a given tabular input file.
- Parameters:
new_info (dict) – A dictionary with the parameters needed to update a summary.
Notes
The summary information is kept in separate TabularSummary objects for each file.
The summary needs a “name” str and a “df” .
- ColumnValueSummary.DISPLAY_INDENT = ' '¶
- ColumnValueSummary.INDIVIDUAL_SUMMARIES_PATH = 'individual_summaries'¶