From a11ca420e6b32b95d52e41fd5dd9863d54348912 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Bel=C3=A1k?= Date: Tue, 1 Aug 2023 13:51:28 +0200 Subject: [PATCH] docs: Update for `DefaultReport` --- docs/advanced.rst | 11 +++++++---- docs/getting_started.rst | 6 +++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docs/advanced.rst b/docs/advanced.rst index 90aa44f..faf8d1b 100644 --- a/docs/advanced.rst +++ b/docs/advanced.rst @@ -10,7 +10,10 @@ Report class ------------ The most important class of the package :py:class:`~edvart.report.Report`. -This class allows you to specify :ref:`verbosity ` or specify which columns should be used. +The report consists of sections, which can be added via methods of the `Report` class. +The report is empty by default. +The class :py:class:`~edvart.report.DefaultReport` is a subclass of `Report`, +which contains a default set of sections. With created instance of `Report` you can: @@ -141,7 +144,7 @@ Or you can set section verbosity (described later). import edvart df = edvart.example_datasets.dataset_titanic() - report = edvart.Report(df, columns_overview=["Name", "Survived"], use_default_sections=False) + report = edvart.Report(df) report.add_overview(omit_columns=["PassengerId"]).add_univariate_analysis( use_columns=["Name", "Sex", "Age"] @@ -176,7 +179,7 @@ Examples: import edvart df = edvart.example_datasets.dataset_titanic() - edvart.Report(df, verbosity=1).export_notebook("test-export.ipynb") + edvart.DefaultReport(df, verbosity=1).export_notebook("test-export.ipynb") .. code-block:: python @@ -185,4 +188,4 @@ Examples: import edvart df = edvart.example_datasets.dataset_titanic() - edvart.Report(df, verbosity=1, verbosity_univariate_analysis=2).export_notebook("test-export.ipynb") + edvart.DefaultReport(df, verbosity=1, verbosity_univariate_analysis=2).export_notebook("test-export.ipynb") diff --git a/docs/getting_started.rst b/docs/getting_started.rst index 7d2040c..352fa81 100644 --- a/docs/getting_started.rst +++ b/docs/getting_started.rst @@ -7,7 +7,7 @@ Getting started import edvart df = edvart.example_datasets.dataset_titanic() - edvart.Report(df).show() + edvart.DefaultReport(df).show() 2. Generate report notebook @@ -15,7 +15,7 @@ Getting started import edvart df = edvart.example_datasets.dataset_titanic() - report = edvart.Report(df) + report = edvart.DefaultReport(df) report.export_notebook("titanic_report.ipynb") You can modify the generated notebook if you want to modify some settings. @@ -28,7 +28,7 @@ For more advanced usage of edvart, please read the documentation section import edvart df = edvart.example_datasets.dataset_titanic() - report = edvart.Report(df) + report = edvart.DefaultReport(df) report.export_html( html_filepath="titanic_report.html", dataset_name="Titanic",