AIPM
Theme

AIPM package

Pandas Pro

@jeffallan/pandas-pro@1.0.0

Performs pandas DataFrame operations for data analysis, manipulation, and transformation.

Scanned · no issues · Dec 1, 2026

GitHub stars: ★ 13K

LinkedInPost

Install Skill

Pins this version in aipm.package.json and aipm-lock.json.

aipm add @jeffallan/pandas-pro@1.0.0

Without project tracking

Writes the skill files only. Add --no-init to skip aipm.package.json and the lockfile.

aipm add @jeffallan/pandas-pro@1.0.0 --no-init

How to use

Install the skill above, then run this in your AI tool:

/pandas-pro <your description>

About

Expert pandas developer specializing in efficient data manipulation, analysis, and transformation workflows with production-grade performance patterns.

Source

What gets added to your project

Preview every file this package writes on install before you run the command above.

Summary

Performs pandas DataFrame operations for data analysis, manipulation, and transformation. Use when working with pandas DataFrames, data cleaning, aggregation, merging, or time series analysis.

Skill instructions

Pandas Pro

Expert pandas developer specializing in efficient data manipulation, analysis, and transformation workflows with production-grade performance patterns.

Core Workflow

  1. Assess data structure — Examine dtypes, memory usage, missing values, data quality:
    python
    print(df.dtypes)
    print(df.memory_usage(deep=True).sum() / 1e6, "MB")
    print(df.isna().sum())
    print(df.describe(include="all"))
    
  2. Design transformation — Plan vectorized operations, avoid loops, identify indexing strategy
  3. Implement efficiently — Use vectorized methods, method chaining, proper indexing
  4. Validate results — Check dtypes, shapes, null counts, and row counts:
    python
    assert result.shape[0] == expected_rows, f"Row count mismatch: {result.shape[0]}"
    assert result.isna().sum().sum() == 0, "Unexpected nulls after transform"
    assert set(result.columns) == expected_cols
    
  5. Optimize — Profile memory, apply categorical types, use chunking if needed

Reference Guide

Load detailed guidance based on context:

TopicReferenceLoad When
DataFrame Operationsreferences/dataframe-operations.mdIndexing, selection, filtering, sorting
Data Cleaningreferences/data-cleaning.mdMissing values, duplicates, type conversion
Aggregation & GroupByreferences/aggregation-groupby.mdGroupBy, pivot, crosstab, aggregation
Merging & Joiningreferences/merging-joining.mdMerge, join, concat, combine strategies
Performance Optimizationreferences/performance-optimization.mdMemory usage, vectorization, chunking

Code Patterns

Vectorized Operations (before/after)

python
# ❌ AVOID: row-by-row iteration
for i, row in df.iterrows():
    df.at[i, 'tax'] = row['price'] * 0.2

# ✅ USE: vectorized assignment
df['tax'] = df['price'] * 0.2

Safe Subsetting with .copy()

python
# ❌ AVOID: chained indexing triggers SettingWithCopyWarning
df['A']['B'] = 1

# ✅ USE: .loc[] with explicit copy when mutating a subset
subset = df.loc[df['status'] == 'active', :].copy()
subset['score'] = subset['score'].fillna(0)

GroupBy Aggregation

python
summary = (
    df.groupby(['region', 'category'], observed=True)
    .agg(
        total_sales=('revenue', 'sum'),
        avg_price=('price', 'mean'),
        order_count=('order_id', 'nunique'),
    )
    .reset_index()
)

Merge with Validation

python
merged = pd.merge(
    left_df, right_df,
    on=['customer_id', 'date'],
    how='left',
    validate='m:1',          # asserts right key is unique
    indicator=True,
)
unmatched = merged[merged['_merge'] != 'both']
print(f"Unmatched rows: {len(unmatched)}")
merged.drop(columns=['_merge'], inplace=True)

Missing Value Handling

python
# Forward-fill then interpolate numeric gaps
df['price'] = df['price'].ffill().interpolate(method='linear')

# Fill categoricals with mode, numerics with median
for col in df.select_dtypes(include='object'):
    df[col] = df[col].fillna(df[col].mode()[0])
for col in df.select_dtypes(include='number'):
    df[col] = df[col].fillna(df[col].median())

Time Series Resampling

python
daily = (
    df.set_index('timestamp')
    .resample('D')
    .agg({'revenue': 'sum', 'sessions': 'count'})
    .fillna(0)
)

Pivot Table

python
pivot = df.pivot_table(
    values='revenue',
    index='region',
    columns='product_line',
    aggfunc='sum',
    fill_value=0,
    margins=True,
)

Memory Optimization

python
# Downcast numerics and convert low-cardinality strings to categorical
df['category'] = df['category'].astype('category')
df['count'] = pd.to_numeric(df['count'], downcast='integer')
df['score'] = pd.to_numeric(df['score'], downcast='float')
print(df.memory_usage(deep=True).sum() / 1e6, "MB after optimization")

Constraints

MUST DO

  • Use vectorized operations instead of loops
  • Set appropriate dtypes (categorical for low-cardinality strings)
  • Check memory usage with .memory_usage(deep=True)
  • Handle missing values explicitly (don't silently drop)
  • Use method chaining for readability
  • Preserve index integrity through operations
  • Validate data quality before and after transformations
  • Use .copy() when modifying subsets to avoid SettingWithCopyWarning

MUST NOT DO

  • Iterate over DataFrame rows with .iterrows() unless absolutely necessary
  • Use chained indexing (df['A']['B']) — use .loc[] or .iloc[]
  • Ignore SettingWithCopyWarning messages
  • Load entire large datasets without chunking
  • Use deprecated methods (.ix, .append() — use pd.concat())
  • Convert to Python lists for operations possible in pandas
  • Assume data is clean without validation

Output Templates

When implementing pandas solutions, provide:

  1. Code with vectorized operations and proper indexing
  2. Comments explaining complex transformations
  3. Memory/performance considerations if dataset is large
  4. Data validation checks (dtypes, nulls, shapes)

Maintained by @jeffallan, Principal Consultant at Synergetic Solutions

Documentation

Loading package files…

Share this package

Add an Install with AIPM badge

Add this badge to a GitHub README so readers can open the package page and install the same version.

Install with AIPM
[![Install with AIPM](https://www.aipm-registry.com/install-with-aipm.svg)](https://www.aipm-registry.com/skills/jeffallan/pandas-pro/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)

Publisher

Jeffallan

This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.

AI assistant context

What this skill is for

@jeffallan/pandas-pro@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: Performs pandas DataFrame operations for data analysis, manipulation, and transformation. Use when working with pandas DataFrames, data cleaning, aggregation, merging, or time series analysis. Invoke for data manipulation tasks such as j...

Install
aipm add @jeffallan/pandas-pro@1.0.0
Use after install
/pandas-pro <your description>

Tool targets

Install command by target

Add --no-init to any of these when you want the skill files without aipm.package.json or aipm-lock.json.

cursor

Run this variant when you want to install the package into cursor.

aipm add @jeffallan/pandas-pro@1.0.0 --target cursor --ci

claude

Run this variant when you want to install the package into claude.

aipm add @jeffallan/pandas-pro@1.0.0 --target claude --ci

Discussion

Comments (0)

Loading comments…

Keep exploring

Jeffallan/php-pro

Use when building PHP applications with modern PHP 8.3+ features, Laravel, or Symfony frameworks. Invokes strict typing, PHPStan level 9, async patterns with Swoole, and PSR standards. Creates controllers, configures middleware, generate...

Published by @Jeffallan

skillScanned · no issues★ 13KImported · UnverifiedAll toolsDec 1, 2026, 12:26 AM15.0 KBMIT

Jeffallan/nuxt-expert

Builds, upgrades and reviews Nuxt 4 full-stack applications: the app/ directory layout, SSR-safe data fetching with useFetch, useAsyncData and $fetch, Nitro server routes with nuxt/server handlers, runtime config and server-only secrets,...

Published by @Jeffallan

skillScanned · flagged★ 13KImported · UnverifiedAll toolsDec 1, 2026, 12:25 AM26.5 KBMIT

Jeffallan/api-designer

Use when designing REST or GraphQL APIs, creating OpenAPI specifications, or planning API architecture. Invoke for resource modeling, versioning strategies, pagination patterns, error handling standards.

Published by @Jeffallan

skillScanned · no issues★ 13KImported · UnverifiedAll toolsNov 25, 2026, 1:07 AM17.8 KBMIT

Package FAQ

Install and compatibility

How to install
Run aipm add @jeffallan/pandas-pro@1.0.0 in a project that has AIPM initialized.
Supported tools
@jeffallan/pandas-pro@1.0.0 supports All tools.

Before installing

AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.