You own a collection of vending machines, and you want to evaluate your inventory. Given a DataFrame of (machine, product, stock), determine the number of machines carrying each product and how many of them are out of stock.
Build a new DataFrame with product as the row index, and calculated columns n_machines
and n_machines_empty.