Install any skill in seconds. Free to start, no credit card required.
Get Started Free →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 joining DataFrames on multiple keys, pivoting tables, resampling time series, handling NaN values with interpolation or forward-fill, groupby aggregations, type conversion, or performance optimization of large datasets.
.claude/skills/jeffallan-pandas-pro/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-02 | ✗→✓ | ▲ Improved | 55% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 264% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 32% | 0% |
| case-10 | ✗→✓ | ▲ Improved | 83% | 0% |
| case-11 | ✗→✓ | ▲ Improved | 34% | 0% |
Expert pandas developer specializing in efficient data manipulation, analysis, and transformation workflows with production-grade performance patterns.
python print(df.dtypes) print(df.memory_usage(deep=True).sum() / 1e6, "MB") print(df.isna().sum()) print(df.describe(include="all"))
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
Load detailed guidance based on context:
| Topic | Reference | Load When | |-------|-----------|-----------| | DataFrame Operations | references/dataframe-operations.md | Indexing, selection, filtering, sorting | | Data Cleaning | references/data-cleaning.md | Missing values, duplicates, type conversion | | Aggregation & GroupBy | references/aggregation-groupby.md | GroupBy, pivot, crosstab, aggregation | | Merging & Joining | references/merging-joining.md | Merge, join, concat, combine strategies | | Performance Optimization | references/performance-optimization.md | Memory usage, vectorization, chunking |
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
.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)
pythonsummary = ( df.groupby(['region', 'category'], observed=True) .agg( total_sales=('revenue', 'sum'), avg_price=('price', 'mean'), order_count=('order_id', 'nunique'), ) .reset_index() )
pythonmerged = 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)
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())
pythondaily = ( df.set_index('timestamp') .resample('D') .agg({'revenue': 'sum', 'sessions': 'count'}) .fillna(0) )
pythonpivot = df.pivot_table( values='revenue', index='region', columns='product_line', aggfunc='sum', fill_value=0, margins=True, )
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")
.memory_usage(deep=True).copy() when modifying subsets to avoid SettingWithCopyWarning.iterrows() unless absolutely necessarydf['A']['B']) — use .loc[] or .iloc[].ix, .append() — use pd.concat())When implementing pandas solutions, provide:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→fail | 16,303 | 45,628 | +180% | 1 | 1 | 0% | 3,416 | 4,851 | +42% | 0 | 0 | — |
case-02 | fail→pass | 14,556 | 15,397 | +6% | 1 | 1 | 0% | 2,919 | 4,536 | +55% | 0 | 0 | — |
case-03 | fail→pass | 3,720 | 4,660 | +25% | 1 | 1 | 0% | 601 | 2,189 | +264% | 0 | 0 | — |
case-04 | pass→pass | 25,245 | 35,281 | +40% | 1 | 1 | 0% | 1,381 | 2,309 | +67% | 0 | 0 | — |
case-05 | pass→pass | 34,826 | 4,748 | -86% | 1 | 1 | 0% | 910 | 2,285 | +151% | 0 | 0 | — |
case-06 | pass→pass | 8,451 | 34,760 | +311% | 1 | 1 | 0% | 930 | 2,172 | +134% | 0 | 0 | — |
case-07 | pass→pass | 10,850 | 8,958 | -17% | 1 | 1 | 0% | 2,079 | 2,951 | +42% | 0 | 0 | — |
case-08 | fail→pass | 15,646 | 14,525 | -7% | 1 | 1 | 0% | 2,590 | 3,425 | +32% | 0 | 0 | — |
case-09 | pass→pass | 3,655 | 3,762 | +3% | 1 | 1 | 0% | 769 | 2,053 | +167% | 0 | 0 | — |
case-10 | fail→pass | 10,729 | 10,260 | -4% | 1 | 1 | 0% | 1,853 | 3,385 | +83% | 0 | 0 | — |
case-11 | fail→pass | 10,025 | 6,231 | -38% | 1 | 1 | 0% | 1,938 | 2,597 | +34% | 0 | 0 | — |
case-12 | pass→pass | 26,867 | 8,864 | -67% | 1 | 1 | 0% | 1,872 | 3,127 | +67% | 0 | 0 | — |
case-13 | pass→pass | 11,823 | 10,832 | -8% | 1 | 1 | 0% | 2,257 | 3,046 | +35% | 0 | 0 | — |
case-14 | pass→pass | 5,856 | 9,242 | +58% | 1 | 1 | 0% | 1,043 | 3,051 | +193% | 0 | 0 | — |
case-15 | pass→pass | 7,998 | 6,452 | -19% | 1 | 1 | 0% | 1,335 | 2,599 | +95% | 0 | 0 | — |
case-16 | pass→pass | 33,933 | 5,864 | -83% | 1 | 1 | 0% | 1,044 | 2,278 | +118% | 0 | 0 | — |
case-17 | pass→pass | 6,288 | 5,947 | -5% | 1 | 1 | 0% | 1,217 | 2,466 | +103% | 0 | 0 | — |
case-18 | pass→pass | 11,077 | 12,507 | +13% | 1 | 1 | 0% | 1,806 | 2,841 | +57% | 0 | 0 | — |
case-19 | fail→pass | 8,375 | 9,185 | +10% | 1 | 1 | 0% | 1,639 | 2,862 | +75% | 0 | 0 | — |
case-20 | pass→pass | 9,413 | 10,653 | +13% | 1 | 1 | 0% | 1,371 | 2,976 | +117% | 0 | 0 | — |
case-21 | pass→pass | 32,127 | 8,415 | -74% | 1 | 1 | 0% | 1,786 | 2,898 | +62% | 0 | 0 | — |
case-22 | pass→pass | 15,633 | 16,073 | +3% | 1 | 1 | 0% | 2,879 | 3,871 | +34% | 0 | 0 | — |
case-23 | pass→pass | 14,819 | 11,906 | -20% | 1 | 1 | 0% | 2,169 | 3,747 | +73% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted. The headline lift of +26 percentage points is the difference between those two pass rates over the 23 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.