Skip to main content

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])

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulire-0.0.9.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulire-0.0.9-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file pulire-0.0.9.tar.gz.

File metadata

  • Download URL: pulire-0.0.9.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pulire-0.0.9.tar.gz
Algorithm Hash digest
SHA256 5936373a64c147a506bb4f382bda2f782e7c8bf94d19ede92be2c0e4f25f5aac
MD5 ae892a4df6ad5da01a580c8054b686e0
BLAKE2b-256 7c990b6e38c25310bc5f904f2a78f0258709b7c8984dc6a454f12ded64b78dcc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulire-0.0.9.tar.gz:

Publisher: publish.yml on meteostat/pulire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pulire-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: pulire-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for pulire-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f998ea85f86b81ce97cf6edc1614039d4309d8b819e0e560b474845e1d6c7b73
MD5 8d93da90e42aaf4b1f2f7ef39a3da862
BLAKE2b-256 f4dedaf0d8de8abac3931ea4c71c0eb149ba691619f56b597c64679c961ced90

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulire-0.0.9-py3-none-any.whl:

Publisher: publish.yml on meteostat/pulire

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 files

0.0.8

2 files

0.0.7

2 files

0.0.6

2 files

0.0.5

2 files

0.0.4

2 files

0.0.3

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page