The StagingBench pricing records contain 13 rows with anonymous tool IDs. Each row describes what the benchmark recorded from a pricing page checked between October 19 and November 26, 2026. The refund, redo, turnaround, maximum resolution and affiliate fields contain yes or blank. The free tier watermark field also contains an explicit no. A blank means the benchmark did not record a value. In Python, None keeps that state distinct from the string "no" through every calculation.
Start by giving the columns names. The script embeds each row as a tuple and pairs the values with their column names using zip. Once the rows are dictionaries, a count can refer to row["redo"] directly. Counter then counts the values from a single column. The output uses fixed orders for the policy fields and the watermark field, so the labels stay in the same place regardless of which value appears first in the rows.
The individual counts tell how often each field was recorded. To measure overlap, all() checks several fields on the same row. Refund and redo each have 10 yes entries, and 9 rows have both. With turnaround included, the overlap is 8. The order of the field names matters in the script because it uses slices of that list to select the relevant fields. The first two are refund and redo, and the first three add turnaround.
A separate check finds the rows where refund, redo, turnaround and maximum output resolution are all None. It uses is None so that the condition specifically means missing data. That returns T10 and T11. The affiliate field stays outside this check because it describes a different aspect of the record. The date strings use year, month and day in that order with zero padding, so the earliest and latest follow from min() and max().
For the watermark breakdown, build the subset by requiring wm_free == "yes". An explicit no and a blank both fall outside that subset. Applying the same counts to the 8 selected rows gives 6 refund entries, 6 redo entries and 5 rows with both. Those same 5 also have turnaround recorded. Maximum output resolution and an affiliate program are each recorded for 4 of the selected rows, while T10 has blanks across the four fields used in the missing data check.
Run the script with Python 3. It uses only the standard library, reads the embedded tuples, and prints the field counts, the overlaps, the matching IDs and the check date range.
from collections import Counter
columns = ("id", "refund", "redo", "turnaround", "max_res", "affiliate",
"wm_free", "checked")
raw_rows = [
("T01", "yes", None, None, None, "yes", "yes", "2026-10-19"),
("T02", "yes", "yes", "yes", None, "yes", "yes", "2026-10-19"),
("T03", "yes", "yes", "yes", None, None, "no", "2026-10-19"),
("T04", None, "yes", None, "yes", None, "yes", "2026-10-19"),
("T05", "yes", "yes", "yes", "yes", None, "yes", "2026-10-19"),
("T06", "yes", "yes", "yes", "yes", None, "yes", "2026-10-19"),
("T07", "yes", "yes", "yes", "yes", None, "yes", "2026-10-19"),
("T08", "yes", "yes", "yes", "yes", "yes", "no", "2026-10-19"),
("T09", "yes", "yes", "yes", None, "yes", "yes", "2026-10-21"),
("T10", None, None, None, None, "yes", "yes", "2026-10-27"),
("T11", None, None, None, None, "yes", None, "2026-10-28"),
("T12", "yes", "yes", "yes", "yes", None, "no", "2026-11-04"),
("T13", "yes", "yes", None, None, None, "no", "2026-11-26"),
]
rows = [dict(zip(columns, values)) for values in raw_rows]
fields = columns[1:6]
def print_coverage(group):
for field in fields:
counts = Counter(row[field] for row in group)
print(f"{field}: {counts['yes']} yes, {counts[None]} blank")
both = sum(all(row[field] == "yes" for field in fields[:2])
for row in group)
all_three = sum(all(row[field] == "yes" for field in fields[:3])
for row in group)
missing = [row["id"] for row in group
if all(row[field] is None for field in fields[:4])]
print(f"Refund and redo: {both}")
print(f"Refund, redo and turnaround: {all_three}")
print(f"Blank refund, redo, turnaround and max_res: {', '.join(missing)}")
print(f"Tools: {len(rows)}")
print_coverage(rows)
watermark_counts = Counter(row["wm_free"] for row in rows)
print(f"wm_free: {watermark_counts['yes']} yes, "
f"{watermark_counts['no']} no, {watermark_counts[None]} blank")
watermarked = [row for row in rows if row["wm_free"] == "yes"]
print(f"\nTools with a free tier watermark: {len(watermarked)}")
print_coverage(watermarked)
dates = [row["checked"] for row in rows]
print(f"\nCheck dates: {min(dates)} to {max(dates)}")
Expected output:
Tools: 13
refund: 10 yes, 3 blank
redo: 10 yes, 3 blank
turnaround: 8 yes, 5 blank
max_res: 6 yes, 7 blank
affiliate: 6 yes, 7 blank
Refund and redo: 9
Refund, redo and turnaround: 8
Blank refund, redo, turnaround and max_res: T10, T11
wm_free: 8 yes, 4 no, 1 blank
Tools with a free tier watermark: 8
refund: 6 yes, 2 blank
redo: 6 yes, 2 blank
turnaround: 5 yes, 3 blank
max_res: 4 yes, 4 blank
affiliate: 4 yes, 4 blank
Refund and redo: 5
Refund, redo and turnaround: 5
Blank refund, redo, turnaround and max_res: T10
Check dates: 2026-10-19 to 2026-11-26
Top comments (0)