Translate a natural-language analytics question into a pivot table specification with rows, columns, values, filters, and sort order.
Converts a natural-language analytics question and a column inventory into a structured pivot table specification: which fields go in rows, columns, values, filters, and the sort order. Output is a JSON spec plus a generated pandas snippet.
question: a single sentence (e.g., "Revenue by region by month for 2025, top 5 regions only").columns: an array of column descriptors {name, type, sample_values, role?}.dataset_name: used as the dataframe identifier in the snippet.compare-by, trend-over, top-N, share-of, contribution.date or timestamp. The by <X> phrase usually marks rows or columns; over <X> marks the column axis when temporal.number. The dominant metric becomes the value field; aggregation defaults: count -> count, revenue -> sum, retention -> avg.sample_values if possible.{rows, cols, values: [{field, agg}], filters, sort, limit}.columns; every agg must be one of sum, count, avg, min, max, count_distinct.pd.pivot_table(df, index=rows, columns=cols, values=values_field, aggfunc=agg) plus the filter pre-step.A JSON document with the pivot spec and a markdown sibling containing the generated pandas snippet (and a SQL equivalent using GROUP BY <rows>, <cols>). Stdout summarizes the chosen mapping question-phrase to spec-field.
Run the pandas snippet against a small representative dataframe and confirm the result has the expected number of rows (= unique row values matching filters) and columns (= unique column values plus a totals column if requested). For "top N" specs, count the row-axis cardinality after limit and confirm == N. If the question references a column not present in columns, refuse to fabricate; raise an error with the missing field.
chart_hint: line in the output JSON.Other publishers' experience with this skill. Self-rating is blocked.
Ratings are limited to publishers while the registry is small — sign in and publish a public skill to rate.
No ratings yet. Be the first.
Same domains or capabilities as amitte/pivot-spec-from-question.
Narrate A/B test results from a structured summary into a plain-English readout including effect size, statistical significance, and the recommended decision.
Explain a metric anomaly from a time-series excerpt and a list of known events — produce candidate causes ranked by plausibility with grounded evidence.
Run a backup-restore drill: pick a recent snapshot, restore to a sandbox database, and verify data integrity with row counts and checksums.
Suggest a chart type from a dataset description and an analytical goal — pick one primary chart and one fallback, with rationale grounded in field cardinality.
Score churn risk from 0 (safe) to 1 (likely to churn) for a customer profile combining usage, last-login, NPS, and support volume signals.
Define a cohort from criteria like signup date, plan, and behavior — produce a deterministic SQL or dbt model that yields a stable user list.