Python Concise Solution
\nfrom collections import defaultdict\n\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n        foods = sorted(list(s
```\nfrom collections import defaultdict\n\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n        foods = sorted(list(set([order[2] for order in orders])))\n        tables = sorted(list(set([int(order[1]) for order in orders])))\n        tableFoodToCount = defaultdict(int)\n        output = [["Table"] + foods]\n        \n        for order in orders:\n            name, table, food = order\n            tableFoodToCount[(table, food)] += 1\n                \n        for table in tables:\n            tableRow = [str(table)]\n            for food in foods:\n                tableRow.append(str(tableFoodToCount[(str(table), food)]))\n            output.append(tableRow)\n        \n        return output\n```
[]