Use pivot
\n# Code\npythondata []\nimport pandas as pd\n\ndef pivotTable(weather: pd.DataFrame) -> pd.DataFrame:\n    return weather.pivot(index = \'month\', columns = \'
\n# Code\n```pythondata []\nimport pandas as pd\n\ndef pivotTable(weather: pd.DataFrame) -> pd.DataFrame:\n    return weather.pivot(index = \'month\', columns = \'city\', values =        \'temperature\')\n    \n```
['Python3', 'Pandas']