A lightweight DataFrame validation library.
Project description
Pulire
A lightweight DataFrame validation library for Pandas.
Auto Formatting
poetry run black .
Testing
Run the following command for unit tests:
poetry run pytest tests
Schema
Pulire requires a Schema which describes all columns in a given DataFrame.
from pulire import Schema, Column, validators, formatters
Schema([
Column("temp", "Float64", [
validators.minimum(-80),
validators.maximum(65),
formatters.decimals(1)
])
])
Validate
Pulire automatically removes values which fail the validation. Let's use the meteostat library to get some data:
from datetime import datetime
from meteostat import Hourly
df = Hourly("10637", datetime(2018, 1, 1), datetime(2018, 1, 1, 23, 59)).fetch()
print(df)
Now, we can get a valid copy of our Meteostat DataFrame by running our schema's validate method:
df = myschema.validate(df)
Lazy Validations
try:
schema.validate(df, lazy=True)
except ValueError as error:
print(error.args[0])
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
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 pulire-0.0.7.tar.gz.
File metadata
- Download URL: pulire-0.0.7.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b81b369806d6a8a6d46742851acb7a667a5f029a1ebc7c381ebd1d909204f303
|
|
| MD5 |
ae6fe13cfb0119b3a22e6c9dcee7b632
|
|
| BLAKE2b-256 |
05416c206138f8df653767e818678e21264560134bb8ec3a49537100379de556
|
Provenance
The following attestation bundles were made for pulire-0.0.7.tar.gz:
Publisher:
publish.yml on meteostat/pulire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pulire-0.0.7.tar.gz -
Subject digest:
b81b369806d6a8a6d46742851acb7a667a5f029a1ebc7c381ebd1d909204f303 - Sigstore transparency entry: 152450533
- Sigstore integration time:
-
Permalink:
meteostat/pulire@14a50f60a61f3dc5b1364ea5ff475d1397e29f9e -
Branch / Tag:
refs/tags/v0.0.7 - Owner: https://github.com/meteostat
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@14a50f60a61f3dc5b1364ea5ff475d1397e29f9e -
Trigger Event:
release
-
Statement type:
File details
Details for the file pulire-0.0.7-py3-none-any.whl.
File metadata
- Download URL: pulire-0.0.7-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
86b314f4cc7e3c9b91a209dc4429934c8cc685d12428185b9c1c9faab46ef362
|
|
| MD5 |
7a83bd87a1707ffbf02badf489812c9a
|
|
| BLAKE2b-256 |
dc333df4992170f285a3e7af6d65a31ddcc4d22335cc47c17dba8fcd7e336ace
|
Provenance
The following attestation bundles were made for pulire-0.0.7-py3-none-any.whl:
Publisher:
publish.yml on meteostat/pulire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pulire-0.0.7-py3-none-any.whl -
Subject digest:
86b314f4cc7e3c9b91a209dc4429934c8cc685d12428185b9c1c9faab46ef362 - Sigstore transparency entry: 152450535
- Sigstore integration time:
-
Permalink:
meteostat/pulire@14a50f60a61f3dc5b1364ea5ff475d1397e29f9e -
Branch / Tag:
refs/tags/v0.0.7 - Owner: https://github.com/meteostat
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@14a50f60a61f3dc5b1364ea5ff475d1397e29f9e -
Trigger Event:
release
-
Statement type: