piper.verbs.summary_df¶
-
piper.verbs.summary_df(datasets, title='Summary', col_total='Total records', add_grand_total=True, grand_total='Grand total')[source]¶ Summarise a dictionary of dataframes.
Summarises a list of dataframes and (optionally) provide a grand total row sum.
- Parameters
datasets – a list tuples containing dataframe description and dataframe(s)
title – title to be used in the summary dataframe.
col_total – column total title
add_grand_total – Default True
grand_total – grand total title
- Returns
- Return type
pandas dataframe containing summary info
Examples
datasets = [('1st dataset', df), ('2nd dataset', df2)] summary_df = summary_df(datasets, title='Summary', col_total='Total records', add_grand_total=True, grand_total='Grand total')