Skip to main content

summarease

Documentation Status Python 3.11 codecov ci-cd

Project Summary

Summarease is a package designed to provide quick insights into a dataset by summarizing its key features. It offers functions that help users understand the structure of the data, making it easier to plan data cleaning and exploratory data analysis (EDA) tasks.

Package Features

  • summarize_dtypes:
    Summarize the data types in the dataset.

  • summarize_target:
    Summarize and evaluate the target variable for categorical or numerical types. Generate a summary or proportion table for numerical or categorical target. Generate a visualization for categorical balance check.

  • summarize_numeric:
    Summarize the numeric variables in the dataset by providing the summary statistics (e.g., mean, standard deviation, min, max, etc.) for each numeric column or plotting the correlation heatmap to visualize the relationships between numeric variables. Generate density plots for each numeric column in the provided dataset. Generate a correlation heatmap for the specified numeric columns in a dataset.

  • summarize:
    Summarize generates a comprehensive PDF report for a dataset, including statistical summaries, visualizations, and target variable analysis. It supports customizable options like sample observations, automatic data cleaning, and flexible summarization methods (tables, plots, or both). Perfect for automating exploratory data analysis (EDA).

Fit Within Python Ecosystem

Summarease is a lightweight and compact Python package designed for efficiency and ease of use. Despite its simplicity, it offers users great flexibility to customize the output format, whether through detailed tables or insightful visualizations.

Why Choose Summarease?

There are several related Python packages with similar functionalities that offer dataset summarization, such as:

  • ydata-profiling – Generates a detailed HTML report but can be slow for large datasets.
  • sweetviz – Provides comparative EDA reports, but lacks customization options for PDF output.
  • dtale – Offers interactive dashboards, but may not be suitable for quick, static reports.

summarease stands out because:

✅ Lightweight & Fast – Summarization and reporting are optimized for performance.
✅ Customizable Reports – Users can configure tables, plots, and formats to match reporting needs.
✅ PDF Export Support – Unlike sweetviz and dtale, summarease directly generates PDF reports.

Installation

$ pip install summarease

To install the development version from git, use:

$ pip install git+https://github.com/UBC-MDS/summarease.git

Documentation

Package documentation can be found here.

Usage

First, import the summarize function from summarease.summarize module.

from summarease.summarize import summarize

Next depending on the way you want summarize your datasets (whether using tables or plots) you can run the following commands:

For generating a report using plots:

The below code will generate a report that contains dominantly plots describing the numeric columns, target variable, correlation heatmap and a table summarizing the data types included in the data. It is intended as a reference to the syntax of our function. For more information, including a walkthrough on how to load the dataset, please see the Example usage section in the docs for the Summarize function.

summarize(
    dataset=iris_df, 
    dataset_name="Iris Dataset Summary", 
    description="Iris Dataset can be found on the UCI Machine Learning Repository",
    summarize_by="plot",
    target_variable="target",
    target_type="categorical",
    output_file="iris_summary.pdf",
    output_dir="./dataset_summary/"
)

For generating a report using tables:

The below code will generate a report that contains tables describing the numeric columns, target variable and data types.

summarize(
    dataset=iris_df, 
    dataset_name="Iris Dataset Summary", 
    description="Iris Dataset can be found on the UCI Machine Learning Repository",
    summarize_by="table",
    target_variable="target",
    target_type="categorical",
    output_file="iris_summary.pdf",
    output_dir="./dataset_summary/"
)

To get in-depth idea of the function you can always run the following code:

help(summarize)

If you find an error or inconsistency, please refer to the Contributing header.

Running tests

You can always run the tests to see if the package works as expected. Before doing that, ensure that you have cloned the repository as described in the Installation section and pytest is installed.

pip install pytest

Navigate to the root directory of the package and run:

pytest

You can also get the coverage score by running the following command:

pytest --cov=summarease

Contributing

Interested in contributing? Check out the contributing guidelines.

Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

summarease is licensed under the terms of the MIT license.

Contributors

summarease was created by Hrayr Muradyan, Yun Zhou, Stephanie Wu, and Zuer Zhong.

Credits

summarease was created with cookiecutter and the py-pkgs-cookiecutter template.

Metadata

Release files for summarease 1.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for summarease 1.1.4
File Size Uploaded Provenance Actions
summarease-1.1.4.tar.gz 14.2 kB Without provenance Details for summarease-1.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for summarease 1.1.4
File Interpreter ABI Platform Actions
summarease-1.1.4-py3-none-any.whl Python 3 none any Details for summarease-1.1.4-py3-none-any.whl

Total release size: 28.6 kB

Release files / summarease-1.1.4.tar.gz

Download URL summarease-1.1.4.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c68f0d7a0c72714fe6cb706cc5cc3d012cb44d639e6db25a011fd4ca24e6ba6d
BLAKE2b-256 checksum
How to use checksums
4f613531e0dfb97d23a7a0763dd450033064583918e24eb8f6187d55c35c6572
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Release files / summarease-1.1.4-py3-none-any.whl

Download URL summarease-1.1.4-py3-none-any.whl
Size 14.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8fe0d84b19c1704a6240e99285e43f5c0095ffc0b212dce2f5a621746bc5b1c9
BLAKE2b-256 checksum
How to use checksums
87435803121af78a284927ea6b01a5c93051d533e56337c2f3c5c78b411b68a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.8

Security for summarease 1.1.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page