-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Open
Labels
enhancementNew feature or an improvement of an existing featureNew feature or an improvement of an existing feature
Description
Description
Often I have code that wants to compare a dataframe against a schema. I do with with df.schema == expected_schema. When this fails, it's hard to figure out what the problem is (often it's a single type mistmatch on some column), or an ordering problem, etc.
It would be nice to have a function polars.testing.assert_schemas_equal(a: polars.Schema, b: polars.Schema) that compares the two schemas and outputs a useful pretty-printed diff showing where the mismatches occur (i.e. the set of columns missing on each side, and type differences on the intersection).
air-kyi, Frankfdbf and johalnes
Metadata
Metadata
Assignees
Labels
enhancementNew feature or an improvement of an existing featureNew feature or an improvement of an existing feature