55. Minesweeper: Reshape to Grid

Hard

Reshape the Minesweeper df into a grid of the adjacent counts: one row per y coordinate, one column per x coordinate, with cell (y, x) holding that square's adjacent-mine count. Drop the mine column first. Return a DataFrame indexed by y, with columns labeled by x under the original adjacent column name.

Sample data: df:

   x  y  mine  adjacent
0  0  0     0       1.0
1  0  1     1       2.0
2  1  0     0       3.0
3  1  1     1       1.0
Implement solve(...)