Data Analysis · Cheat Sheet
Doing It With AI
AI-Era Cheatsheet
Honest charts
- Form follows question: line = time, sorted bars = category comparison, histogram/percentiles = distribution, scatter = relationship, table = exact values or at most about five numbers (≤ means "at most"; ~ means "about")
- The three classic lies:
| Lie | Mechanism | Fix |
|---|---|---|
| Truncated bar axis | Bars encode length; non-zero base breaks it | Bars start at zero; zoomed lines OK if labeled + variation context |
| Dual axes | Two chosen scales = any visual relationship you want | Index both series to 100, or two aligned panels |
| Cumulative chart | Can only go up; hides per-period decline | Demand the per-period version |
- Annotation is analysis: state the claim on the chart, mark events, show the normal-variation band
- Check ordering (value-sorted bars; time in time order), color semantics (red is not automatically good — red ≠ good, where ≠ means "is not"), and selection (why this window, this metric, these categories?)
- Read axes, units, and date range before reacting to any chart's shape — especially AI-generated defaults
Directing an AI EDA (exploratory data analysis)
Sequence: grain → profile → hypothesis → checks. You own the design; the AI owns the typing.
Opening prompt (always):
Before any analysis: what does one row represent? Show COUNT(*)
vs distinct counts of every plausible key. Flag columns repeated
within a key. Do not compute metrics yet.
Profiling prompt: request the tables (types, head/tail, NULL %, min/max dates, value counts, percentiles, sentinels), then the judgment — evidence you can read beats reassurance.
Hypothesis prompt: state the claim, the exact test, and the required evidence (cohort table split by channel, with denominators) — not "find interesting patterns."
Ask for the checks, not just the answers
- Show row counts at each step (load, filter, join, exclusions)
- After each join: row count unchanged + total revenue reconciles
- Segment subtotals sum to overall; report any gap and NULL-key count
- Compute the metric two independent ways; confirm agreement
If the checks aren't in the output, they weren't run. Fluency is not accuracy — strip the narrative, audit the tables, spot-check 2–3 numbers against raw data.
Fishing vs hypothesis-driven
- "Find insights" = hundreds of slices tested per minute = guaranteed chance patterns delivered confidently
- Fishing is legitimate only as a candidate generator; every survivor gets re-tested as a stated hypothesis (Statistics track: multiple comparisons)
The analysis-audit checklist
| # | Check | Question |
|---|---|---|
| 1 | Grain | One row = one what? Distinct key count = row count? |
| 2 | Quality | NULLs profiled? Sentinels? Denominators shown? |
| 3 | Filters | Every literal a named decision? Step row counts logged? |
| 4 | Joins | Counts + known totals reconcile across every join? |
| 5 | Ratios | Sum/sum everywhere — no averaged averages? |
| 6 | Mix | Segment/cohort trends match the blended story? |
| 7 | Periods | No partial-vs-complete comparisons? Pipeline lag handled? |
| 8 | Distribution | Medians alongside means on long tails? Top-10 rows checked? |
| 9 | Charts | Zero-based bars, no dual axes, claims annotated? |
| 10 | Verdict | Three parts: survives / fails / decision-relevant unknowns |
Audit posture
- Audit the pipeline, not the prose — coherent narratives are easy to write and prove nothing
- Don't stop at the first error; errors stack (ask "what does the claim look like after ALL the bugs?")
- Ask when the data was pulled — partial periods hide in every live dashboard
- Deliver the three-part verdict with the next decision-relevant question, not just "your numbers are wrong"
Aligned to the pandas documentation and the practical data-analysis canon.
Make this cheat sheet yours
Personalize this sheet — focus it however you study, or build one from the exact questions you keep getting wrong.