An interactive data profiling library for Python notebooks with rich HTML reports and PDF export capabilities
Project description
pytics
An interactive data profiling library for Python that generates comprehensive HTML reports with rich visualizations and PDF export capabilities.
Features
- 📊 Interactive Visualizations: Built with Plotly for dynamic, interactive charts
- 📱 Responsive Design: Reports adapt to different screen sizes
- 📄 PDF Export: Generate publication-ready PDF reports
- 🎯 Target Analysis: Special insights for classification/regression tasks
- 🔍 Comprehensive Profiling: Detailed statistics and distributions
- ⚡ Performance Optimized: Efficient handling of large datasets
- 🛠️ Customizable: Configure sections and visualization options
Example Reports
Full Profile Report
Targeted Analysis Report
Installation
pip install pytics
Quick Start
import pandas as pd
from pytics import profile
# Load your dataset
df = pd.read_csv('your_data.csv')
# Generate an HTML report
profile(df, output_file='report.html')
# Generate a PDF report
profile(df, output_format='pdf', output_file='report.pdf')
# Profile with a target variable
profile(df, target='target_column', output_file='report.html')
# Select specific sections
profile(
df,
include_sections=['overview', 'correlations'],
output_file='report.html'
)
Report Sections
-
Overview
- Dataset summary
- Memory usage
- Data types distribution
- Missing values summary
-
Variable Analysis
- Detailed statistics
- Distribution plots
- Missing value patterns
- Unique values analysis
-
Correlations
- Correlation matrix
- Feature relationships
- Interactive heatmaps
-
Target Analysis (when target specified)
- Target distribution
- Feature importance
- Target correlations
Configuration Options
profile(
df,
target='target_column', # Target variable for supervised learning
include_sections=['overview'], # Sections to include
exclude_sections=['correlations'],# Sections to exclude
output_format='pdf', # 'html' or 'pdf'
output_file='report.html', # Output file path
theme='light', # Report theme
title='Custom Report Title' # Report title
)
Edge Cases and Limitations
Data Size Limits
- Recommended maximum rows: 1 million
- Recommended maximum columns: 1000
- Large datasets may require increased memory allocation
Special Cases
- Missing Values: Automatically handled and reported
- Categorical Variables: Limited to 1000 unique values by default
- Date/Time: Automatically detected and analyzed
- Mixed Data Types: Handled with appropriate warnings
Error Handling
- Custom exceptions for clear error reporting
- Warning system for non-critical issues
- Graceful degradation for memory constraints
Best Practices
-
Memory Management
- Sample large datasets if needed
- Use section selection for focused analysis
- Monitor memory usage for big datasets
-
Performance Optimization
- Limit categorical variables when possible
- Use targeted section selection
- Consider data sampling for initial exploration
-
Report Generation
- Choose appropriate output format
- Use meaningful report titles
- Save reports with descriptive filenames
Contributing
Contributions are welcome! Please feel free to submit a Pull Request. See the CONTRIBUTING.md file for guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytics-1.1.1.tar.gz.
File metadata
- Download URL: pytics-1.1.1.tar.gz
- Upload date:
- Size: 18.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96315f55b6085f7de992e4df7d1057711293a7dd9ffcf92a5e51f01800b5b37f
|
|
| MD5 |
5ea6dd7cbe13c84a88bc675cc06dd0c3
|
|
| BLAKE2b-256 |
15c7e9734348b71e74c6290d526e9d466842df083a794b716f61e6cdf901e8e5
|
File details
Details for the file pytics-1.1.1-py3-none-any.whl.
File metadata
- Download URL: pytics-1.1.1-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5bdfee45e6f273a56d85974397935ba228aa8568257a582fd981de17e18b1e2f
|
|
| MD5 |
d5cea7dec2856d063177f92fa4cd77c9
|
|
| BLAKE2b-256 |
233c43ef760b50dd2bacc75308c628538774c7ba48f850785da20317c6c59cec
|