2 Python 🐍  solutions, one using 2 Dicts one using Nested Dicts
Nested Dictionary solution\n\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n        \n        allDishes=set()\n     
Nested Dictionary solution\n```\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n        \n        allDishes=set()\n        myFood={}\n        \n        for name,tableNo,dish in orders:\n            if dish not in allDishes:\n                allDishes.add(dish)\n                \n            if (tableNo) in myFood:\n                if dish in myFood[(tableNo)]:\n                    myFood[(tableNo)][dish]=myFood[(tableNo)][dish]+1\n                else:\n                    myFood[(tableNo)][dish]=1\n            else:\n                myFood[(tableNo)]={dish:1}\n        print(myFood)\n        allDishes=sorted(allDishes)\n        allFood=["Table"] +[d for d in allDishes ]\n        res=[]\n        res.append(allFood)\n        \n        for table in sorted(myFood, key=int): #int to sort tables ascendingly \n            t=[]\n            t.append((table))\n            for i in range(1,len(allFood)):\n                currDish=allFood[i]\n                if currDish in myFood[(table)]:\n                    t.append(str(myFood[(table)][currDish]))\n                else:\n                    t.append(\'0\')\n            res.append(t)\n        return res\n```\n\n\n2nd solution without using 2 dicts\n\n```\nclass Solution:\n    def displayTable(self, orders: List[List[str]]) -> List[List[str]]:\n        \n        allDishes=set()\n        myTablesFood=collections.Counter()\n        myTables=set()\n        \n        for name,tableNo,dish in orders:\n            allDishes.add(dish)\n            myTables.add(tableNo)\n            myTablesFood[tableNo+dish]+=1\n        \n        allDishes=["Table"]+sorted(allDishes)\n        display=[allDishes]\n\n        for t in sorted(myTables,key=int):\n            tableOrder=[t]\n            for dish in allDishes[1:]:\n                tableOrder.append(str(myTablesFood[t+dish]))\n            display.append(tableOrder)\n        return display\n```\n
['Python', 'Python3']