💊 Data Doctor 💊
Data Doctor is a Python library for cleaning, preprocessing, transforming, and validating pandas DataFrames with an optional PyQt GUI for non-technical users.
Features
-
Data Cleaning
- Remove duplicates
- Fill missing values with mean, median, or custom strategies
- Standardize string columns (trim, lowercase)
- Email validation
-
Data Transformation
- Normalize numeric columns
- Encode categorical variables
-
Validation
- Check for missing values, duplicates, and column types
-
Pipeline Support
- Run cleaning, transformation, and validation in a single workflow
Installation
# Clone the repo
git clone https://github.com/noahharshbarger/data-doctor.git
cd data-doctor
# Create virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install package in editable mode with dev dependencies
pip install -e ".[dev]"
Or directly from PyPI:
pip install data-doctor
Usage
import pandas as pd
from data_doctor.cleaner import DataCleaner
from data_doctor.pipeline import DataPipeline
# Example DataFrame
df = pd.DataFrame({
"name": ["Alice", "Bob", None, "Charlie"],
"age": [25, None, 30, 22],
"email": ["alice@test.com", "bob@test.com", "invalid_email", None]
})
# Using DataCleaner
cleaner = DataCleaner(df.copy())
df_cleaned = (cleaner
.drop_duplicates()
.fill_missing(strategy="mean")
.standardize_strings()
.run_email_validation("email")
.get_df())
# Using DataPipeline
pipeline = DataPipeline(df.copy())
df_pipeline = (pipeline
.run_basic_cleaning()
.run_transformations())
validation_report = pipeline.validate()
print(df_pipeline)
print(validation_report)
Testing
# Run all tests
pytest tests/
# Run tests with coverage
pytest --cov=src/data_doctor tests/
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
Licensure
MIT License © Noah Harshbarger
Metadata
Release files for data-doctor-lib 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| data_doctor_lib-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / data_doctor_lib-0.1.0-py3-none-any.whl
| Download URL | data_doctor_lib-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0b93f1086799d3e102457f5b76a074ad1c4d686c17ec94cb140eaccd0cd2d7a9
|
|
BLAKE2b-256 checksum How to use checksums |
08c88a7555397a57cd61a75fccad61b60c78dadd8ce0ccf58521863f66233ab1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for data-doctor-lib 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.