Skip to content

Improve error reporting, add coerce option

Compare
Choose a tag to compare
@cosmicBboy cosmicBboy released this 29 Dec 19:35

This release adds two new features to pandera.

Improved error reporting

Now failure cases in column checks are displayed in a much more compact format,
where the failure cases, the index of the dataframe where those failures occur, and the
count of failure cases are shown to the user, e.g.

# failure cases:
#              index  count
# failure_case
# foo1           [0]      1
# foo2           [1]      1
# foo3           [2]      1

Coerce option in DataFrameSchema and Column

Now the user can coerce the dataframe when calling schema.validate so that
the columns are cast into the expected data-type before performing Checks.