/data-ml:pandera-polars [Pandera Polars schema, validation task, code, or failure]from data-ml
Writes, reviews, debugs, or tests Pandera schemas and runtime validation for Polars DataFrame/LazyFrame pipelines using pandera[polars]. Covers DataFrameSchema, DataFrameModel, Column, Field, Check, PolarsData, coercion, strictness, and lazy error collection.
Ships in data-ml. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Create executable Polars dataframe contracts whose backend, validation depth, coercion, failure aggregation, and pipeline boundary are explicit.
Use this skill only for Pandera's Polars backend. Import it as
pandera.polars; pandas, Ibis, PySpark, and Narwhals-backed behavior differs.
Use the Polars skill for transformation semantics and this skill for runtime
dataframe contracts. Do not replace ordinary Python object validation with a
one-row dataframe schema.
| Object | Runtime meaning | Use it for |
|---|---|---|
DataFrameSchema | An executable schema object containing Polars column and dataframe checks. | Dynamic/programmatic schemas and schema composition. |
Column | A named column contract: dtype, nullability, requirement, uniqueness, coercion, and checks. | Per-column structural and value rules. |
Check | A predicate contract evaluated by the backend. | Domain constraints not captured by dtype/nullability. |
DataFrameModel | A class-declared schema compiled from annotations, Fields, checks, and config. | Reusable named contracts with type-checker-friendly declarations. |
Field | Declarative column constraints inside a DataFrameModel. | Built-in comparisons, membership, aliases, nullable/unique behavior. |
PolarsData | Custom-check input holding a LazyFrame and optional column key. | Native vectorized Polars checks. |
SchemaError / SchemaErrors | One validation failure or an aggregate of failures. | Machine-readable failure handling and diagnostics. |
Two kinds of “lazy” must remain separate:
pl.LazyFrame is a deferred Polars query. Pandera's native Polars validation
checks schema-level properties by default and does not automatically execute
all data-level checks on an uncollected plan.schema.validate(..., lazy=True) requests accumulation of multiple validation
failures before raising; it does not make eager validation computationally
lazy.Read the schema and validation model before choosing a schema style or claiming that values were checked.
pandera.polars as pa. Confirm the installed Pandera and Polars
versions before copying a backend feature or signature.DataFrameSchema for dynamic composition or DataFrameModel for a
stable named contract. Do not maintain both as independent sources of truth.LazyFrame, collect or otherwise establish a supported
execution boundary; do not report schema-only validation as full validation.coerce, strict, and lazy independently. Each changes a different
contract.failure_cases/error categories,
not exception prose alone.| Need | Use | Do not confuse it with |
|---|---|---|
| Programmatic/reusable schema value | pa.DataFrameSchema | A Python class instance model. |
| Declarative named dataframe contract | pa.DataFrameModel | Pydantic BaseModel. |
| Reject unspecified columns | strict=True | required=True, which concerns declared columns. |
| Drop unspecified columns intentionally | Installed strict="filter" support | Silent schema drift; test passthrough loss. |
| Convert compatible inputs | coerce=True at the chosen scope | Validation-only behavior; coercion mutates the returned representation. |
| Gather all failures | validate(..., lazy=True) | A Polars LazyFrame. |
| Vectorized custom column rule | Check receiving PolarsData and returning Boolean LazyFrame output | Python element callbacks. |
| Cross-column invariant | Dataframe-level native check | A column check that cannot see the needed peer fields. |
Read the operation map for schemas, models, checks, decorators, and pipeline placement.
import pandera.polars as pa
import polars as pl
ORDERS = pa.DataFrameSchema(
{
"order_id": pa.Column(
pl.Int64,
checks=pa.Check.ge(1),
nullable=False,
unique=True,
),
"country": pa.Column(
pl.String,
checks=pa.Check.isin(["DE", "FR", "NL"]),
nullable=False,
),
"amount": pa.Column(
pl.Float64,
checks=pa.Check.ge(0),
nullable=True,
),
},
strict=True,
coerce=False,
)
def validate_orders(frame: pl.DataFrame) -> pl.DataFrame:
return ORDERS.validate(frame, lazy=True)
This rejects extra columns, does not silently coerce identifiers or amounts, checks all data-level rules on an eager frame, and aggregates failures. If the boundary intentionally normalizes compatible types, turn on coercion and test the returned dtypes and failed dirty values; do not use coercion to make an unknown schema “pass.”
import pandera.polars as pa
import polars as pl
from pandera.polars import PolarsData
def start_before_end(data: PolarsData) -> pl.LazyFrame:
return data.lazyframe.select(pl.col("start") <= pl.col("end"))
INTERVALS = pa.DataFrameSchema(
{
"start": pa.Column(pl.Datetime),
"end": pa.Column(pl.Datetime),
},
checks=pa.Check(start_before_end),
)
A native custom check returns a Boolean LazyFrame shape accepted by the
backend. Avoid element_wise=True for a vectorizable condition; the Polars
backend implements elementwise Python callbacks through a slower row path.
pandera.pandas examples in Polars code.nullable, required, unique, strict, and coerce are independent.
State each required policy rather than relying on defaults.LazyFrame, establish whether schema-only validation is acceptable. If
row values must be proven, validate an eager boundary or a currently
documented supported full-data path.Run the backend inspector, read version and backend grounding, and use the validation test matrix.
Do not declare completion until the import selects the Polars backend; the schema style has one source of truth; exact dtypes, required/null/unique/extra and coercion policies are asserted; eager versus lazy-frame validation depth is tested; vectorizable rules stay native; the returned validated frame is used; every rule has a failing example; aggregated failures are asserted structurally; and installed-version checks cover backend-specific syntax. Report any schema-only LazyFrame validation or skipped dependency execution explicitly.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub skillmds/skillmd --plugin data-ml28 skills in this plugin
/adpRedpanda's Agentic Data Plane: governance infrastructure for building, running, and governing AI agents and MCP servers, plus a proxying AI Gateway for LLM providers, operated via `rpk ai` and the ADP API. Use when creating or managing AI agents (managed or self-managed) via `rpk ai agent` or `AgentRegistryService`; configuring MCP servers (remote or managed catalog, code mode, auth); setting up LLM providers or querying models via `rpk ai llm`/`rpk ai model` or the AI Gateway proxy; or configuring budgets, guardrails, or Cedar access-control policies through the governance APIs. Also covers reading agent transcripts and spending insights, and wiring OAuth clients or providers to the aigw Authorization Server. For the separate rpk cloud mcp control-plane MCP server, see `/redpanda:rpk-cloud`./ads-mathCalculate and model paid-media CPA, CPL, CPC, CPM, ROAS, MER, break-even targets, contribution margin, LTV:CAC, impression-share opportunity, budgets, forecasts, and experiment economics. Use for PPC math, ad calculator, break-even analysis, ROAS calculator, CPA calculator, budget forecast, LTV CAC, or MER./agentic-kaggle-skillKaggle-first end-to-end competition workflow for scored submissions. Use when Codex must run Kaggle or competitive ML workflows through scored submission, including code competitions, validation, metrics, policy-safe public notebook/discussion intel, tabular/text/image modeling, tuning, ensembling/stacking, proactive multi-notebook architectures, producer notebooks that train models and export private Kaggle artifact datasets, downstream consumer notebooks, Kaggle GPU offload, kagglehub access, hidden-test debugging, and public score retrieval./agent-recallPersistent compounding memory for AI agents. 5 default MCP tools: session_start, session_end, remember, recall, check. Full surface (18 tools) available with --full flag. Two-verb model: inhale (session_start) and exhale (session_end). Correction-first memory with decision trail tracking, watch_for warnings, palace rooms with salience scoring, cross-project insight matching, same-day journal merging, ambient recall hooks. Local markdown only. Zero cloud, zero telemetry, Obsidian-compatible. Optional Supabase backend: when configured via `ar setup supabase`, recall() uses pgvector cosine similarity on OpenAI/Voyage embeddings instead of keyword search — same API, semantic understanding. Gracefully degrades to local search if not configured./BMW-design-analysisBMW's corporate site — distinct from BMW M's motorsport-bombastic variant, this is a measured and settled corporate-automotive interface. On a light (cream-tinted white) canvas, BMW corporate blue (#1c69d4) carries every primary CTA; dark navy hero bands frame model photography. BMW Type Next Latin sets the entire hierarchy on two weights — heavy 700 display and Light 300 body. Configuration and reservation flows ride a card-based 4-up grid, where each card holds a model render, a name, and a "Learn More" link./bpmn-generatorEnterprise BPMN 2.0 diagram generator — converts natural language process descriptions into OMG-compliant BPMN 2.0 XML files and SVG previews via a 4-phase pipeline: Intent Extraction (LLM → JSON Logic-Core) → Validation (deadlock detection, structural soundness) → ElkJS Auto-Layout → BPMN XML + SVG output. Supports: multi-pool collaborations, message flows, boundary events (timer/error/signal), loop/multi-instance markers, data objects, all gateway types with correct gatewayDirection, and all BPMN 2.0 task types. Use this skill whenever the user wants to create, generate, or model a BPMN diagram, process flow, or workflow — even if they say "draw a process", "model this workflow", "make a BPMN for...", "create a Prozessmodell", "visualize this process", or describe a business process in natural language. Also use for editing or extending existing BPMN Logic-Core JSON.
Other plugins' skills for the same job