[docs]defget_word_report(data:Iterable,*,title:str="Exploratory Data Analysis Report",graph_color:str="cyan",groupby_variable:Union[str,int]=None,output_filename:str="eda-report.docx",table_style:str="Table Grid",)->ReportDocument:"""Analyze `data`, and generate a report document in *Word* (*.docx*) format. Args: data (Iterable): The data to analyze. title (str, optional): The title to assign the report. Defaults to "Exploratory Data Analysis Report". graph_color (str, optional): The color to apply to the graphs. Defaults to "cyan". groupby_variable (Union[str, int], optional): The label/index for the column to use to group values. Defaults to None. output_filename (str, optional): The name/path to save the report document. Defaults to "eda-report.docx". table_style (str, optional): The style to apply to the tables created. Defaults to "Table Grid". Returns: ReportDocument: Document object with analysis results. Example: .. literalinclude:: examples.txt :lines: 136-142 """returnReportDocument(data,title=title,graph_color=graph_color,output_filename=output_filename,groupby_variable=groupby_variable,table_style=table_style,)
[docs]defsummarize(data:Iterable)->Union[Variable,Dataset]:"""Get summary statistics for the supplied data. Args: data (Iterable): The data to analyze. Returns: Union[Variable, Dataset]: Analysis results. Example: .. literalinclude:: examples.txt :lines: 172-195 """data=_validate_dataset(data)ifdata.shape[1]==1:returnVariable(data.squeeze())else:returnDataset(data)