Skip to main content

A Python library for Exploratory Data Analysis and Profiling.

Project description

Pydata-visualizer

PyPI version Python versions License: MIT

A powerful and intuitive Python library for exploratory data analysis and data profiling. Pydata-visualizer automatically analyzes your dataset, generates interactive visualizations, and provides detailed statistical insights with minimal code.

Features

  • 📊 Comprehensive Data Profiling: Analyze numerical, categorical, boolean, and string data types
  • 🔍 Automated Data Quality Checks: Detect missing values, outliers, skewed distributions, and more
  • 📈 Interactive Visualizations: Generate distribution plots, correlations heatmaps, and statistical charts
  • 📝 Rich HTML Reports: Export analysis to visually appealing and shareable HTML reports
  • Performance Optimized: Fast analysis even on large datasets
  • 🔄 Correlation Analysis: Calculate Pearson, Spearman, and Cramér's V correlations between variables

Installation

pip install pydata-visualizer

Quick Start

import pandas as pd
from data_visualizer.profiler import AnalysisReport, Settings

# Load your dataset
df = pd.read_csv("your_dataset.csv")

# Create a report with default settings
report = AnalysisReport(df)
report.to_html("report.html")

Advanced Usage

Customizing Analysis Settings

from data_visualizer.profiler import AnalysisReport, Settings

# Configure analysis settings
report_settings = Settings(
    minimal=False,          # Set to True for faster, minimal analysis
    top_n_values=5,         # Show top 5 values in categorical columns
    skewness_threshold=2.0  # Tolerance for skewness alerts
)

# Create report with custom settings
report = AnalysisReport(df, settings=report_settings)

# Perform analysis and get results dictionary
results = report.analyse()

# Generate HTML report
report.to_html("custom_report.html")

Report Structure

The generated report includes:

  • Overview: Dataset dimensions, missing values, duplicate rows
  • Variable Analysis: Detailed per-column statistics and visualizations
  • Sample Data: Head and tail samples of the dataset
  • Correlations: Correlation matrices and heatmaps

API Reference

AnalysisReport Class

class AnalysisReport:
    def __init__(self, data, settings=None):
        """
        Initialize the analysis report object.
        
        Parameters:
        -----------
        data : pandas.DataFrame
            The dataset to analyze
        settings : Settings, optional
            Configuration settings for the analysis
        """
        
    def analyse(self):
        """
        Perform the data analysis.
        
        Returns:
        --------
        dict
            A dictionary containing all analysis results
        """
        
    def to_html(self, filename="report.html"):
        """
        Generate an HTML report from the analysis.
        
        Parameters:
        -----------
        filename : str, optional
            Path to save the HTML report (default: "report.html")
        """

Settings Class

class Settings(pydantic.BaseModel):
    """
    Settings for the analysis report.
    
    Attributes:
    -----------
    minimal : bool, default=False
        Whether to perform minimal analysis
    top_n_values : int, default=10
        Number of top values to show for categorical columns
    skewness_threshold : float, default=1.0
        Threshold for skewness alerts
    """

Type Analyzers

The library automatically detects and applies the appropriate analysis for different data types:

  • Numeric: Statistical measures, distribution plots, skewness, kurtosis
  • Categorical/String: Value counts, cardinality, frequency distributions
  • Boolean: Value counts and proportions
  • Generic: Basic analysis for unrecognized types

Correlation Analysis

Three correlation methods are calculated when possible:

  • Pearson: Linear correlation between numerical variables
  • Spearman: Rank correlation capturing monotonic relationships
  • Cramér's V: Measure of association between categorical variables

Data Quality Alerts

The library automatically detects potential issues in your data:

  • High Missing Values: Columns with significant missing data
  • Skewness: Highly skewed distributions

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Credits

Created by Aditya Deshmukh (adideshmukh2005@gmail.com)

GitHub: https://github.com/Adi-Deshmukh/Data_Profiler

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

pydata_visualizer-0.2.2.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

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

pydata_visualizer-0.2.2-py3-none-any.whl (18.3 kB view details)

Uploaded Python 3

File details

Details for the file pydata_visualizer-0.2.2.tar.gz.

File metadata

  • Download URL: pydata_visualizer-0.2.2.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for pydata_visualizer-0.2.2.tar.gz
Algorithm Hash digest
SHA256 037a3edeaa3bfd2cacb92a53b0a33b6a064efc22e4bda7199af5ced4864ba167
MD5 ded92b28f62a45766b0c54a8390155b9
BLAKE2b-256 4d639a3cb2c2415b0fbd75d808d13fc47546e978cf62bb9cde6f797f00ebfc7f

See more details on using hashes here.

File details

Details for the file pydata_visualizer-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for pydata_visualizer-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 77d741ba18a76b8daff40f1642489a38472a10fe4a172b5c57b0216f94e754b4
MD5 b416fc6ad71e6511ddd690f573b34b57
BLAKE2b-256 5b3907c064d9fa6c4334a62390b1b743405b7468422c04669cdbbef13898ddfb

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