"content":"<pre>\nDataFrame <code>weather</code>\n+-------------+--------+\n| Column Name | Type |\n+-------------+--------+\n| city | object |\n| month | object |\n| temperature | int |\n+-------------+--------+\n</pre>\n\n<p>Write a solution to <strong>pivot</strong> the data so that each row represents temperatures for a specific month, and each city is a separate column.</p>\n\n<p>The result format is in the following example.</p>\n\n<p> </p>\n<pre>\n<strong class=\"example\">Example 1:</strong>\n<strong>Input:</strong>\n+--------------+----------+-------------+\n| city | month | temperature |\n+--------------+----------+-------------+\n| Jacksonville | January | 13 |\n| Jacksonville | February | 23 |\n| Jacksonville | March | 38 |\n| Jacksonville | April | 5 |\n| Jacksonville | May | 34 |\n| ElPaso | January | 20 |\n| ElPaso | February | 6 |\n| ElPaso | March | 26 |\n| ElPaso | April | 2 |\n| ElPaso | May | 43 |\n+--------------+----------+-------------+\n<strong>Output:</strong><code>\n+----------+--------+--------------+\n| month | ElPaso | Jacksonville |\n+----------+--------+--------------+\n| April | 2 | 5 |\n| February | 6 | 23 |\n| January | 20 | 13 |\n| March | 26 | 38 |\n| May | 43 | 34 |\n+----------+--------+--------------+</code>\n<strong>Explanation:\n</strong>The table is pivoted, each column represents a city, and each row represents a specific month.</pre>\n",