A "subscription trap" is really just an unnoticed recurring charge, and unnoticed-recurring is a pattern a script can find far more reliably than a person skimming dozens of transaction lines. The task is: group transactions by merchant, count how many times each merchant appears, and flag anything appearing repeatedly at a similar amount — exactly the kind of aggregation a code-execution tool handles cleanly.
Finding recurring charges reliably
1. Upload several months of statement data to a code-execution tool. You need enough history (ideally 3+ months) to distinguish a genuinely recurring charge from a coincidental one-off similar amount.
2. Ask it to group by merchant and count occurrences, flagging repeats. "Group transactions by merchant name, count how many times each appears, and list any appearing 2 or more times with amounts within $2 of each other" is a concrete, code-executable request.
3. Review the flagged list yourself — a repeat isn't automatically unwanted. The tool's job is surfacing candidates; deciding which recurring charges you actually want to cancel is still a human judgment call.
# Detecting recurring charges via grouping and counting
import pandas as pd
df = pd.read_csv("statement_3months.csv")
grouped = df.groupby("description").agg(
occurrences=("amount", "count"),
avg_amount=("amount", "mean"),
amount_range=("amount", "std")
).reset_index()
# Flag merchants appearing 2+ times with consistent amounts
likely_subscriptions = grouped[
(grouped["occurrences"] >= 2) & (grouped["amount_range"] < 2.0)
]
print(likely_subscriptions.sort_values("occurrences", ascending=False))
| Approach | Reliability |
|---|---|
| Manually scanning a long transaction list | Low — easy to miss a small, infrequent, or oddly-named recurring charge |
| Grouping + counting via code execution | High — systematically surfaces every merchant repeating at a consistent amount |
This is a genuinely good AI-assisted task specifically because it reduces to a deterministic aggregation the model can run as real code, rather than an open-ended judgment call — the "trap" framing is just the human decision layered on top of an otherwise mechanical detection step.
Practical Challenge
Upload 3+ months of your own bank statement data to a code-execution tool and ask it to flag merchants appearing 2 or more times with consistent amounts — review the list for anything you'd forgotten you were paying for.
Concept Check
Sources & Further Reading
- pandas Documentation: DataFrame.groupby — the aggregation method used to detect recurring merchant charges.
AI