Match Tableau in pandas (read_tableau_export.py, check_direction.py): exports, LODs, table calculations, Across vs Down, each difference traced. Not for base grain; use grain-check.
Ships in data-analytics. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
Reproduce a Tableau view or calculation in pandas from the same raw files so both tools agree within an explicit
tolerance, or prove the structural reason they differ. Match grain, filters (in Tableau's order of operations)
and Compute Using direction. Write outputs under out/; keep data/ read-only.
gateway(op="call", capability="data", args={op: "inspect"|"stats", path: "<file>", ...}) (op: "inspect" for .xlsx sheets; op: "stats" for types, nulls and date span); for a simple view, args={op: "stats", path: "<file>", where: {...}, group_by: [...], aggregates: [...]} with sum:, sum:A*B, count or count_distinct: reproduces its marks and grand total without Python when the result says complete: true. Confirm whether a multi-table workbook uses a Tableau relationship ("noodle", preserves each table's grain) or a physical join (repeats rows per match).SUM, AVG, COUNT, COUNTD, MIN, MAX), discrete (YEAR, QUARTER, MONTH) vs continuous (DATETRUNC) dates, sort key and Compute Using direction.| Tableau | pandas | Trap |
|---|---|---|
SUM([Sales]), AVG([Discount]) | df["Sales"].sum(), df["Discount"].mean() | AVG is unweighted per row |
COUNTD([Order ID]) | df["Order ID"].nunique() | COUNT / Number of Records is len(df): lines, not orders |
SUM([Profit]) / SUM([Sales]) | df["Profit"].sum() / df["Sales"].sum() | Never the mean of row ratios |
YEAR([Order Date]), continuous MONTH | .dt.year, .dt.to_period("M") | Discrete month parts merge years |
| Matched entities via relationship | df.loc[df["Order ID"].isin(other["Order ID"]), "Order ID"].nunique() | A merge fans out lines |
{FIXED [D]: AGG([M])} | df.groupby("D")["M"].transform("agg") | Ignores regular dimension filters, respects Context filters: apply Context filters before transform, regular filters after |
{INCLUDE [D]: AGG([M])} | Group by view dims + D, then re-aggregate to view dims | Inner aggregation runs at the finer grain |
{EXCLUDE [D]: AGG([M])} | Group by view dims minus D, broadcast back via merge/transform | Compares a slice with its parent subtotal |
RUNNING_SUM(SUM([M])) | sort_values(...) then .cumsum() | pandas has no implicit pill sort; sort first |
% of Total | s / s.sum(); pivot.div(pivot.sum(axis=1), axis=0) (Across) | Flipping axis=0/axis=1 swaps Across and Down |
LOOKUP(agg, FIRST()) | pivot.div(pivot.iloc[:, 0], axis=0) (Across), pivot.div(pivot.iloc[0, :], axis=1) (Down) | Cohort retention is Table Across |
WINDOW_AVG(SUM([M]), -k, 0) | .rolling(window=k+1, min_periods=1).mean() | Partial edge windows count unless "Null if not enough values" is set |
| YoY Growth | complete monthly index, then .pct_change(12) | A missing month shifts pct_change(12) to the wrong month |
INDEX() / SIZE() | np.arange(1, len(s) + 1) / len(s) after Tableau's sort | Ties change rank |
Multi-line recipes live in <base_dir>/references/patterns.md. Round only for the final comparison.
Transcribe fewer than ~10 marks directly; clean larger exports (Tableau Public "Download > Crosstab", Desktop
"Worksheet > Export > Crosstab to Excel", "View Data", often UTF-16 tab-separated with currency signs, thousands
separators, decimal commas, % and Grand Total rows) with the bundled reader, not bare pd.read_csv:
uv run python <base_dir>/scripts/read_tableau_export.py export.csv --out out/tableau_view.csv
uv run python <base_dir>/scripts/read_tableau_export.py export.csv --melt Region --name Year --value Sales --out out/tableau_view.csv
uv run python <base_dir>/scripts/read_tableau_export.py export.csv --total-label "Subtotal" --out out/tableau_view.csv
Check stderr diagnostics (encoding, separator, decimal sign, dropped total rows). Flags: --decimal ,|., repeatable
--total-label (beyond Grand Total, Total), --melt (unpivot wide crosstabs). If Tableau itself misreads a CSV
(Abc text or 100x scaling), check Text File Properties locale against decimal separator and ISO dates (YYYY-MM-DD).
When a percentage, running total or cohort ratio disagrees, compare table_across, table_down and table_entire
(--agg: sum, countd, mean, count; --calc: pct_of_total, running_sum, lookup_first):
uv run python <base_dir>/scripts/check_direction.py data/orders.csv \
--rows Category --cols Region --value Sales --agg sum --calc pct_of_total
validate="one_to_one", indicator=True) and report one-sided keys first.tol = 0); compare currency and percentages within a declared tolerance (e.g. 0.005 currency, 0.01 percentage points).COUNT vs COUNTD, fan-out join, date part vs continuous date, sort order, min_periods, Compute Using direction, rounding or locale parsing). Never edit source data or reference values to force agreement.What SKILL.md sets; muted values are Claude Code's defaults
/data-analytics:tableaufrom data-analytics
npx claudepluginhub panstudio/pancode --plugin data-analytics9 skills in this plugin
/analysis-projectStart a pinned uv analysis project or check one is ready (check_workspace.py), then lay out its notebook and prompt appendix. Read-only check; syncs only with the user's go. Not for the analysis itself; use pandas-descriptive./chartsMake and check bar, line, histogram or scatter charts (plotly_chart.py, matplotlib): backing table printed, sorted, labelled, bars from zero. Not for dashboards; use streamlit-app./customer-analyticsCohort retention, top-customer share and RFM (cohort_table.py, pareto_rfm.py) for repeat and best customers, counting customers and orders, not lines. Not for k-means clusters; use modelling.Other plugins' skills for the same job