1-line solution
\n# Please, upvote if you like it. Thanks :-)\nimport pandas as pd\n\ndef pivotTable(weather: pd.DataFrame) -> pd.DataFrame:\n    return weather.pivot(index=\'m
```\n# Please, upvote if you like it. Thanks :-)\nimport pandas as pd\n\ndef pivotTable(weather: pd.DataFrame) -> pd.DataFrame:\n    return weather.pivot(index=\'month\', columns=\'city\', values=\'temperature\')\n```
['Python3']