Skip to content

Use verify_rows and verify_columns #48

@topper-123

Description

@topper-123

Hi @TomAugspurger ,

Thanks for this great library, I use it a lot.

A lot of verification is done row-wise and/or column-wise. Engarde has some specific row/column functions, but I suggest adding functions that take generic functions that operate on rows/columns:

That means we can do something like this generically:

@verify_columns({'A': lambda col: col.sum() > 5})
@verify_rows(lambda row: row.A > row.B)
def add(df1, df2):
    return df1 + df2

This functionality would by default verify that all checks pass, but by setting how='any', we could also check that just any row/column pass the test (example: verify_rows(lambda row: row.A > row.B, how='any')).

Would you accept a pull request along these lines?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions