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.1.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.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: rostaing_report-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 3802a620f15c94e80def2b0121d664f3ae855388e016696e35cdee8c2a485730
MD5 4924edf66448b3ee6f1378cd543165e7
BLAKE2b-256 866825611bf0e5b9708bdec936237018b4b1a176c5698b417dbb8bc867138338

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rostaing_report-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c008ae455e48f8176c4569bc3992ecabb7725fb94e3298422a0462e4619e7f46
MD5 b5e3ca932bc919da113f187390a5c649
BLAKE2b-256 57aa4ecb4691dc47bede7b29c3006a674483cc0e56446d6243ce3f0e77a2b86c

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