code: def transpose(self, rows):
          
          res = OrderedDict()
          for row, cols in rows.items():
              for col, cell in cols.items():
                  if col not in res:
                      res[col] = OrderedDict()
                  res[col][row] = cell
          return res
docs: Transposes the grid to allow for cols