Install & Compatibility
Where this runs
tested against v0.3.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 165.5MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 7.7s · import 0.000s · 158MB
165MB installed
● package 165MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
DataFrameSchema
✓ from pandas_schema import DataFrameSchema
✗ from pandas_schema.schema import DataFrameSchema
DataFrameSchema is exposed at the package level
Column
✓ from pandas_schema import Column
Check
✓ from pandas_schema.validation import Check
✗ from pandas_schema import Check
Check and validators are in the validation submodule
Define a schema and validate a DataFrame. Returns list of errors.
import pandas as pd
from pandas_schema import DataFrameSchema, Column
from pandas_schema.validation import CanConvertValidation
schema = DataFrameSchema({
'age': Column(int, [
CanConvertValidation(int)
])
})
df = pd.DataFrame({'age': ['25', '30']})
errors = schema.validate(df)
if errors:
for error in errors:
print(error)
else:
print('Validation passed')
Upgrade
Version history
0.3.6latest on PyPI · released Feb 18, 2022
Audit
Dependencies
pandasrequiredRequired to work with DataFrames