LavenderTown
A Streamlit-first Python package for detecting and visualizing "data ghosts": type inconsistencies, nulls, invalid values, schema drift, and anomalies in tabular datasets.
LavenderTown helps you quickly identify data quality issues in your datasets through an intuitive, interactive Streamlit interface. Perfect for data scientists, analysts, and engineers who need to understand their data quality before diving into analysis.
✨ Key Features
- 🔍 Zero-config data quality insights - Get started with minimal setup
- 📊 Streamlit-native UI - Fully integrated interactive dashboard
- 🐼 Pandas & Polars support - Works with your existing data pipelines
- 🎯 Interactive detection - Drill down into problematic rows
- 📤 Exportable findings - JSON, CSV, and Parquet formats
- 🔄 Drift detection - Compare datasets for schema and distribution changes
- ⚙️ Custom rules - Create and manage data quality rules via UI
- 🤖 ML-powered detection - 40+ anomaly detection algorithms
- 📈 Time-series analysis - Advanced time-series feature extraction
- 🚀 High performance - Optimized for datasets up to millions of rows
New in v0.7.0: Modular UI components, Plotly interactive visualizations, tsfresh time-series features, Streamlit Extras UI, and SQLAlchemy database backend.
📦 Installation
pip install lavendertown
For optional features (Polars, ML, time-series, Plotly, etc.), see the Installation Guide.
🚀 Quick Start
import streamlit as st
from lavendertown import Inspector
import pandas as pd
# Load your data
df = pd.read_csv("your_data.csv")
# Create inspector and render
inspector = Inspector(df)
inspector.render() # Must be called within a Streamlit app context
Save this as app.py and run streamlit run app.py to see the interactive dashboard.
📚 Documentation
- Getting Started - Installation and setup
- User Guide - Comprehensive usage documentation
- API Reference - Complete API documentation
- Examples - Code examples and tutorials
- Version Mapping - Feature version history
👻 Ghost Categories
LavenderTown detects four main categories of data quality issues:
- Structural Ghosts - Mixed dtypes, schema drift, unexpected nullability
- Value Ghosts - Out-of-range values, regex violations, enum violations
- Completeness Ghosts - Null density thresholds, conditional nulls
- Statistical Ghosts - Outliers (IQR method), distribution shifts
👉 Learn more about ghost detection →
💡 Usage Examples
Programmatic Usage
from lavendertown import Inspector
import pandas as pd
df = pd.read_csv("data.csv")
inspector = Inspector(df)
findings = inspector.detect()
for finding in findings:
print(f"{finding.column}: {finding.description}")
CLI Usage
# Analyze a CSV file
lavendertown analyze data.csv --output-format json
# Compare datasets for drift
lavendertown compare baseline.csv current.csv
🛠️ Development
# Clone and install
git clone https://github.com/eddiethedean/lavendertown.git
cd lavendertown
pip install -e ".[dev]"
# Run tests
pytest tests/
# Code quality
ruff format . && ruff check . && mypy lavendertown
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔗 Links
- 📖 Documentation: https://lavendertown.readthedocs.io/en/latest/
- 📦 PyPI Package: https://pypi.org/project/lavendertown/
- 🐙 GitHub Repository: https://github.com/eddiethedean/lavendertown
- 🐛 Issues: https://github.com/eddiethedean/lavendertown/issues
Made with ❤️ for the data quality community
Metadata
Release files for lavendertown 0.7.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lavendertown-0.7.1.tar.gz | 203.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lavendertown-0.7.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 318.2 kB
Release files / lavendertown-0.7.1.tar.gz
| Download URL | lavendertown-0.7.1.tar.gz |
|---|---|
| Size | 203.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
31fb071f6998917fa54dc9a3a970cda2bc22ed41c99814341f12a229b800200f
|
|
BLAKE2b-256 checksum How to use checksums |
64454ef08e0969f1fe09ef9ff141e1121be761cb165c8c84b079eae228b5ac7d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|
Release files / lavendertown-0.7.1-py3-none-any.whl
| Download URL | lavendertown-0.7.1-py3-none-any.whl |
|---|---|
| Size | 115.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72f8cca829760b87eeb60dea883c37afb9c444e340f4c991098f838172691dd0
|
|
BLAKE2b-256 checksum How to use checksums |
cf60572552e37358b5f5489da89f843ae8db14beeeb387f0f5555b85e8a79bb8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.13
|