def display_summary(df: pd.DataFrame, export: str): """Show summary statistics Parameters ---------- df_stock : pd.DataFrame DataFrame to get statistics of export : str Format to export data """ summary = qa_model.get_summary(df) print_rich_table( summary, headers=list(summary.columns), floatfmt=".3f", show_index=True, title="[bold]Summary Statistics[/bold]", ) console.print("") export_data( export, os.path.dirname(os.path.abspath(__file__)).replace("common", "stocks"), "summary", summary, )
def display_summary(df: pd.DataFrame, export: str): """Show summary statistics Parameters ---------- df_stock : pd.DataFrame DataFrame to get statistics of export : str Format to export data """ summary = qa_model.get_summary(df) print( tabulate(summary, headers=summary.columns, tablefmt="fancy_grid", floatfmt=".3f"), "\n", ) export_data( export, os.path.dirname(os.path.abspath(__file__)).replace("common", "stocks"), "summary", summary, )