In index, how do I create a new dict which takes all the non-zero share entries to display. For example I can use stocks = db.execute and use SUM(shares) to get the total shares for each stock. But then I want to create a new dict which only has those corresponding entries and not all the ones in the table. Do I say new_stocks = {}{} or and the populate it new_stocks[row1]["shares"] = ...
thanks for any assistance.