Skip to content
Back to skills

Dataframe

ASecurity

Transform tabular data with pandas or polars cleanly and reproducibly

  • 3 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 3, 2026
ai-agentspythongoexpressapi

Works with

  • api

Security analysis

A100/100

Scanned September 3, 2026

npx -y skills add black141312/ada --skill dataframe --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Dataframe?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Dataframe
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/black141312-dataframe/badge)](https://www.skillsdirectory.com/skills/black141312-dataframe)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: dataframe
description: Transform tabular data with pandas or polars cleanly and reproducibly
category: data-ml
---

# Dataframe

Use when wrangling tabular data — cleaning, reshaping, joining, aggregating — with pandas or polars, and you want correct, readable, vectorized code.

1. Load with explicit dtypes (and parse dates) so columns don't silently become object/float; check `df.dtypes` and shape first.
2. Inspect before transforming: nulls per column, value ranges, duplicates, and cardinality of key columns.
3. Build the transform as a chain of vectorized ops (filter, assign/with_columns, groupby/agg, merge/join) — avoid `iterrows`/Python loops.
4. Be explicit about join keys and `how`; verify row count after each join to catch fan-out from non-unique keys.
5. Handle missing data deliberately (drop, fill, or flag) rather than letting NaN propagate into aggregates.
6. Validate the output shape, dtypes, and a few known values before writing; persist to a columnar format (Parquet) when possible.

## Rules
- Prefer vectorized/expression APIs over `apply` with Python functions; reach for `apply` only as a last resort.
- Avoid chained-assignment on slices in pandas (use `.loc`); in polars build new frames with expressions.
- Always validate row counts around joins and groupbys — silent fan-out and dropped rows are the top bugs.
- Set dtypes at read time; don't rely on inference for ids, categoricals, or money.
- Keep transforms as a pure function of the input frame so the same input always yields the same output.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…