---
name: "pandas-vectorized-cleaning"
description: "Clean and normalize messy datasets using vectorized Pandas string and numeric operations."
metadata:
  author: "Pandas"
  version: "1.0.0"
  runtime_compatibility:
    - "codex"
    - "claude-code"
    - "cursor"
    - "windsurf"
triggers:
  - "vectorized data cleaning pandas"
  - "extract regex with pandas str"
  - "handle missing values pandas"
permissions:
  fs_read: true
  fs_write: "workspace"
  shell_exec: false
  net_access: false
---

# Pandas Vectorized Data Cleaning & Regex Filtering

Applies vectorized Pandas workflows: str.extract regex pattern parsing, pd.to_datetime timestamp parsing with format strings, missing data imputation with bfill/ffill, and clip outliers.

## When to Invoke
Invoke this skill whenever you need to:
- vectorized data cleaning pandas
- extract regex with pandas str
- handle missing values pandas

## Execution SOP & Rules
1. Replace slow row-wise for-loops and .apply(lambda) with vectorized column operations.
2. Extract named regex groups using df['text'].str.extract(r'(?P<area>\d{3})-(?P<num>\d{4})').
3. Parse timestamps with explicit format strings: pd.to_datetime(df['date'], format='%Y-%m-%d').
4. Handle NaN values explicitly using .fillna(), .interpolate(), or .dropna() with subset lists.

## Verification Checklist
- Run local linting, syntax validation, and type-checks before reporting completion.
- Ensure all created or modified files adhere to workspace boundaries and avoid uncommitted secrets.
- Verify tests or build commands exit cleanly with return code 0.
