← All samples

Restaurant Tipping Analysis

Sample project (personal work, no client). Stack: Python 3.12, pandas 3.x, SQLite.

What the pipeline does

  1. Validates input (244 transactions): schema check, numeric coercion, business-rule assertions (positive bills, non-negative tips, sane party sizes).
  2. Derives tip percentage — the core behavioral metric.
  3. Aggregates by day, time, smoker status, and party size.
  4. Reports findings in plain English; stores the cleaned dataset in SQLite for downstream queries.

Actual output (real run)

[load] 244 valid rows, 0 dropped, schema OK
[sqlite] cleaned dataset stored (244 rows) for downstream queries

RESTAURANT TIPPING ANALYSIS — FINDINGS
Sample: 244 transactions
Average bill: $19.79 | Average tip: 16.1% (median 15.5%)

By day (mean tip % / count):
  Fri       16.99%  (n=19)
  Sat       15.32%  (n=87)
  Sun       16.69%  (n=76)
  Thur      16.13%  (n=62)

Party size effect: tip % peaks at size 1 (21.73%) and is lowest at size 5 (14.15%)
Smoker vs non-smoker gap: +0.4 percentage points

Key findings

Verification: headline numbers were independently recomputed from raw data after the run (16.1 / 15.5 — exact match). During QA, this pipeline went through a 7-case executed test plan; two defects found were fixed and regression-verified (see the QA sample).