Reshape Data: Pivot
IntuitionApproachUse pivot_table() on the input DataFrame weather.
Set 'month' as the index (rows).
Set 'city' as the columns.
Set 'temperature' as the values.
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->
Use pivot_table() on the input DataFrame weather.
Set 'month' as the index (rows).
Set 'city' as the columns.
Set 'temperature' as the values.
Use 'max' as the aggregation function in this code
# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->

# Code
```pythondata []
import pandas as pd

def pivotTable(weather: pd.DataFrame) -> pd.DataFrame:
    return weather.pivot_table(index = 'month', columns = 'city', values = 'temperature', aggfunc = 'max')
```
['Pandas']