Change the key to compare shops

To ask which shop has most Food rows, keep the same qualifying item test but use bill.Store as the key. The fixed three-shop problem could use three counters, but a dictionary also handles new shops without inventing a new variable for every name.
| Shop | Food item rows in all 30 cards |
|---|---|
| SV Stores | 73 |
| Big Bazaar | 15 |
| Sun General | 9 |
| Total | 97 |
The spoken Lecture 7.6 tally is 72,10,9. We preserve the original bill cards and recompute 73,15,9: the spoken SV accumulation includes an addition slip, and Radha’s five Food rows in Bill 30 belong to Big Bazaar. The learning pages use the complete original dataset rather than forcing the spoken totals.
SV Stores is highest under the Food-row measure. Calling it “most popular” needs that measure stated: it is not necessarily highest revenue, most bills or most distinct customers. Changing the requested category may change which shop leads.
Try it yourself
Why can the shop and customer dictionaries have the same grand total?
Show explained answer
They partition the same 97 Food rows by different keys. Each qualifying row contributes once to each partition.
Try it yourself
Can a dictionary handle a fourth shop?
Show explained answer
Yes. Create its key when a qualifying row first appears.
Try it yourself
Does 73 mean 73 customers?
Show explained answer
No. It means 73 Food item rows across the observed bills at SV Stores.
