langtest.utils.report_utils.save_format#
- save_format(format: str, save_dir: str, df_report: DataFrame)#
Save the provided report DataFrame into a specified format at a given directory.
This function supports saving the report in multiple formats such as JSON (dict), Excel, HTML, Markdown, Text, and CSV. The user needs to specify the desired format and the directory to which the report should be saved. If a format that isn’t supported is provided, an error will be raised.
Parameters: - format (str): The desired format to save the report in. Supported values are “dict”, “excel”, “html”, “markdown”, “text”, and “csv”. - save_dir (str): The directory path where the report should be saved. This must be provided for all formats. - df_report (pd.DataFrame): The report DataFrame containing the data to be saved.