A fork of Engarde, a python package for defensive data analysis.
The differences between this fork and Engarde proper are:
- renamed
verify
toverify_df
. - Added two new functions in
generic
:verify_columns
. Verifies columns. E.g.checks.verify_columns(df, lambda x: (x > 0).all())
verify_rows
. Verifies rows. E.g.checks.verify_rows(df, lambda row: row.A > row.B)
- Deleted
verify_all
andverify_any
. Basically I consider these less useful thanverify_columns
andverify_rows
and I like that the API is small. verify_columns
andverify_rows
functions are added tochecks
anddecorators
.has_dtypes
can accept functions that returnTrue
if the test is passd (typically the ones inpd.api.types
, e.g.is_integer_dtype
) and can accept strings from the allowed string output ofpd.api.types.infer_dtypes
.
pip install topper-123-engarde
and then in your python code:
import engarde
For details, see doc strings for relevant functions. For a tutorial, see Engarde's tutorial, but beware the differences.