A library for quick data verification
Project description
ZogPy
A test PyPI package
To Implement
Schema & Structure Validation
- validate_schema(df, required_cols, dtypes=None)
- Checks required columns exist
- Optional dtype enforcement
- Detects unexpected columns
- validate_dtypes(df, dtype_map)
- Enforces numeric / categorical / datetime
- Handles nullable pandas dtypes
- validate_shape(df, min_rows=None, max_rows=None)
- Dataset sanity checks
- Empty dataset detection
Missing Data Validation
- check_missing(df, threshold=0.0)
- Percent missing per column
- Fail if above threshold
- require_non_null(df, cols)
- Strong constraint for critical fields
- report_missing_summary(df)
- Returns structured summary
- Useful for logging / dashboards
Range & Value Constraints
- validate_numeric_range(df, col, min=None, max=None)
- Non-negative values
- Physical constraints (age, price, distance)
- validate_allowed_values(df, col, allowed)
- Enums / categorical safety
- Prevents category explosion
- validate_boolean(df, col)
- Ensures only {0,1} or {True,False}
Uniqueness & Key Constraints
- validate_unique(df, cols)
- Primary key enforcement
- Composite keys supported
- check_duplicates(df, cols=None)
- Full row or column subset
Cross-Column Logic
- validate_column_relationship(df, col_a, col_b, op)
- EX: start <= end
- validate_conditional_null(df, if_col, if_val, then_required)
- EX: if status == "closed" → closed_at must not be null
Statistical & Distribution Checks
- detect_outliers(df, col, method="iqr" | "zscore")
- Flags, doesn’t auto-remove
- Returns indices or mask
- check_distribution_shift(df_train, df_new, col)
- Mean / variance change
- KS test
- Drift detection
- validate_cardinality(df, col, max_unique)
- Prevents feature blow-up
Formatting & Parsing Validation
- validate_regex(df, col, pattern)
- Emails
- ID
- Codes
- validate_datetime(df, col, allow_future=False)
- Timestamp sanity
- Log/event data validation
Referential Integrity
- validate_foreign_key(df, col, reference_set)
- No orphan rows
- Common in joins
Dataset-Level Quality Checks
- validate_row_count_change(df_old, df_new, max_delta_pct)
- Detect broken ingestion jobs
- validate_freshness(df, timestamp_col, max_age)
- Streaming / batch safety
Reporting & DX
- validate_all(df, rules)
- EX: validate_all(df, [require_non_null("user_id"), validate_unique(["user_id"]), validate_numeric_range("age", 0, 120),])
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
zogpy-0.1.1.tar.gz
(3.7 kB
view details)
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
zogpy-0.1.1-py3-none-any.whl
(3.9 kB
view details)
File details
Details for the file zogpy-0.1.1.tar.gz.
File metadata
- Download URL: zogpy-0.1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c4b2f3169b0a3429be6316dda61ae402dd39709b8852c924dbafa02af516810
|
|
| MD5 |
5d958f12681c360372ef7fba81569586
|
|
| BLAKE2b-256 |
1ea8ba7326f17faaa796b8534fea0a1d7db7510df110f6e7ae2d47ffc343f6b4
|
File details
Details for the file zogpy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: zogpy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 3.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
50b459b2795f2e7de83187b3f4e70f48b727ea99de618ae44bb29207fe4b89f4
|
|
| MD5 |
17d51a9d9a98bb21707fdf0112c7e57b
|
|
| BLAKE2b-256 |
aa9b7334f170a0454cbfdbd690cecdc1089909547ed9e83c499622d4dfc4fbde
|