Skip to main content

Generate comprehensive EDA and statistical reports from Pandas DataFrames with a single line of code.

Project description

Rostaing Report, created by Davila Rostaing.

rostaing-report is a powerful yet easy-to-use Python package designed to dramatically accelerate the Exploratory Data Analysis (EDA) process. In just one line of code, it generates a complete and beautifully formatted report from a Pandas DataFrame, covering everything from descriptive statistics to key inferential tests.

This toolkit is built for Data Scientists and Data Analysts who need to gain a deep, initial understanding of their data quickly and efficiently. By providing a holistic view of variable types, distributions, missing values, outliers, and correlations, rostaing-report empowers you to make informed, data-driven decisions about feature engineering, modeling strategy, and data cleaning priorities.

Key Features

  • 📊 Detailed Overview: Get a bird's-eye view of your dataset, including row/column counts, memory usage, duplicate rows, and a clear breakdown of variable types.
  • 🔢 In-depth Numerical Analysis: For each numerical column, instantly see statistics like mean, standard deviation, quantiles, variance, skewness, kurtosis, standard error, and outlier detection.
  • 🔠 Insightful Categorical Analysis: Understand your categorical variables with counts, unique values, top occurrences, and frequencies.
  • 🔗 Smart Correlation Analysis: Instead of a giant matrix, view a clean, sorted table of the most significant variable correlations, complete with a plain-English interpretation (e.g., "Strong Positive Correlation").
  • 🧪 Built-in Statistical Tests: Perform common inferential statistics tests directly from your EDA object, including:
    • Normality Tests (Shapiro-Wilk, Jarque-Bera)
    • Independence Test (Chi-squared)
    • Group Comparison Tests (T-test, Mann-Whitney U, Kruskal-Wallis)
  • ✨ Beautiful & Flexible Display: The report is automatically rendered as a stylish HTML table in notebooks (Jupyter, VS Code) and as a clean, readable text table in terminals.

Installation

Install the package from PyPI with a single command:

pip install rostaing-report

Quick Start

Getting a full data profile is as simple as this:

import pandas as pd
import numpy as np
from rostaing import rostaing_report

# 1. Create a sample DataFrame
data = {
    'product_id': range(100),
    'price': np.random.normal(150, 40, 100).round(2),
    'customer_age': np.random.normal(35, 8, 100).astype(int),
    'category': np.random.choice(['Electronics', 'Books', 'Home Goods', 'Apparel'], 100),
    'rating': np.random.choice([1, 2, 3, 4, 5, np.nan], 100, p=[0.05, 0.05, 0.1, 0.3, 0.4, 0.1]),
    'is_member': np.random.choice([True, False], 100)
}
df = pd.DataFrame(data)

# 2. Generate the full EDA report
report = rostaing_report(df)

# 3. Display the report
# In a Jupyter Notebook or similar environment, just run:
# eda

# In a standard Python script or terminal, use print():
print(report)

In-Depth Usage

Beyond the main report, you can access powerful statistical methods directly.

The Main Report Breakdown

The rostaing_report(df) object provides several detailed sections:

  • Overview Statistics: Key metrics about the entire dataset.
  • Variable Types: A summary table of all data types (int64, float64, object, etc.) and their counts.
  • Numerical Variables Analysis: A deep dive into each number-based column. The has_outliers column (based on the IQR method) is especially useful for spotting anomalies.
  • Categorical Variables Analysis: A summary of all text-based, boolean, or categorical columns.
  • Top Correlations: A sorted list of the most correlated numerical variables, making it easy to spot multicollinearity or interesting relationships. The interpretation column saves you time.

Performing Statistical Tests

Validate your hypotheses directly from the eda object.

1. Test for Normality

Check if a variable follows a normal distribution.

# H0: The 'price' data is drawn from a normal distribution.
normality_results = report.normality_test('price', test='shapiro')
print(pd.Series(normality_results))

# Output:
# test                                     Shapiro-Wilk
# column                                          price
# statistic                                    0.985532
# p_value                                      0.370834
# conclusion (alpha=0.05)    The null hypothesis (normality) cannot be r...
# dtype: object

2. Test for Independence (Categorical Variables)

Check if two categorical variables are independent.

# H0: 'category' and 'is_member' are independent variables.
chi2_results = report.chi2_test('category', 'is_member')

print(f"P-value: {chi2_results['p_value']:.4f}")
print(f"Conclusion: {chi2_results['conclusion (alpha=0.05)']}")
# Output:
# P-value: 0.8876
# Conclusion: The variables are independent (p >= 0.05).

3. Compare Two Independent Groups (Non-parametric)

Check if the distribution of a numerical variable is the same across two groups.

# H0: The distribution of 'price' is the same for members and non-members.
mw_results = report.mann_whitney_u_test(col='price', group_col='is_member')
print(pd.Series(mw_results))

# Output:
# test                                                 Mann-Whitney U
# compared_variable                                           price
# groups                                               False vs True
# U_statistic                                               1241.0
# p_value                                                   0.963973
# conclusion (alpha=0.05)    No significant difference between distributi...
# dtype: object

Why rostaing-report?

  • Speed: Go from a raw DataFrame to a full, insightful report in seconds. Drastically reduce the time spent on boilerplate EDA code.
  • Clarity: The structured output, both in notebooks and terminals, is designed for maximum readability. The plain-English interpretations for correlations help you communicate findings faster.
  • Completeness: It bridges the gap between descriptive statistics and initial hypothesis testing by bundling both into one cohesive interface.
  • Better Decision-Making: By quickly identifying potential issues like outliers, high cardinality, skewness, or unexpected correlations, you can make smarter, evidence-backed decisions on how to proceed with your data modeling or business analysis.

Contributing

Contributions are welcome! If you have ideas for new features, find a bug, or want to improve the documentation, please feel free to open an issue or submit a pull request on the project's repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Useful Links

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rostaing_report-0.1.0.tar.gz (11.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rostaing_report-0.1.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file rostaing_report-0.1.0.tar.gz.

File metadata

  • Download URL: rostaing_report-0.1.0.tar.gz
  • Upload date:
  • Size: 11.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for rostaing_report-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cd8955f0c5d17c4a2f2dcdc81a8c8867035691e6ab5d023c1a62cc8fbbe2aae7
MD5 2b1e6173bbbf87d9033d1659174c863f
BLAKE2b-256 a44cb30803385b61c16de1ae0b5a37763395b9a4d6aa45fc7c38c01783cc9b3e

See more details on using hashes here.

File details

Details for the file rostaing_report-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for rostaing_report-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fe886740a6a17f0664698fd4d5fe8bd3b6f8ccc7c754c8605f502999c5eba2e7
MD5 427f5190c5880507d46345a896815487
BLAKE2b-256 a2bbd39b84510a328eaddacbfa0fa607a7b750fc9ef6dc46c3071f8bfa8a2992

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page