dataframely

Validate Polars data frames with dy.Schema and dy.Collection.

609|20|Updated Apr 17, 2025
One-click install
npx skills add https://github.com/Quantco/dataframely --skill dataframely
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dataframely
Source: https://github.com/Quantco/dataframely/tree/main/skills
Command: npx skills add https://github.com/Quantco/dataframely --skill dataframely

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide helps engineers apply dataframely to enforce schema-driven validation in Polars workflows, reducing data quality issues and streamlining typing and testing.

Core Features & Use Cases

  • Define schemas with dy.Schema and collections with dy.Collection to model dataframe structures.
  • Validate and filter data frames at runtime using dy.Schema.validate and dy.Schema.filter to enforce constraints.
  • Leverage type hints and testing conventions to improve readability and reliability in Polars-based pipelines.

Quick Start

Read this guide to implement dataframely schemas and validations in your Polars workflows.

Frequently Asked Questions about dataframely

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I validate a Polars dataframe against a schema?

Schema validation in Polars uses dy.Schema and dy.Collection to model dataframe structures, applying .validate() and .filter() methods to enforce constraints and catch data quality issues at runtime.

How do I enforce typing and schema contracts in Polars ETL pipelines?

You enforce schema contracts in Polars ETL pipelines by defining dy.Schema structures with type hints, then using .validate() to check data frames and .filter() to remove records violating constraints.

What is the best way to filter invalid rows in a Polars dataframe?

The best way to filter invalid rows is using the dy.Schema.filter method, which evaluates dataframe records against your defined schema constraints and separates valid data from invalid entries.

Can I use dataframely to model multiple related dataframe structures?

Yes, you can model multiple related dataframe structures by defining a dy.Collection, which groups multiple dy.Schema definitions to validate complex data relationships across your Polars workflows.

Does schema-driven validation work for testing Polars data processing workflows?

Schema-driven validation works for testing Polars workflows by leveraging type hints and testing conventions alongside dy.Schema, improving readability and reliability when validating dataframe transformations.