Get the latest tech news
Dataframely: A polars-native data frame validation library
We present dataframely, a declarative data frame validation library with first-class support for polars data frames.
Once we'd rewritten a chain of transformations in polars, the absence of static type checking or runtime validation on data frame contents meant that bugs were hard to catch. If any row in invoices is invalid, i.e., any rule defined on individual columns or the entire schema evaluates to False, a validation exception is raised. This has the benefit that dataframely can be adopted in a gradual fashion where any dy.DataFrame[...] can easily be passed to a method that accepts a pl.DataFrame(and vice versa by using type: ignore comments).
Or read this on Hacker News