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