To pivot value use `.pivot(and then tell which 'columns', 'index', 'values')`
IntuitionSince we have to pivot some rows into columns we will use .pivot.ApproachAfter using, pivot lets decide what should be index that is Primary key to ide
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
Since we have to pivot `some rows into columns` we will use `.pivot`.
# Approach
<!-- Describe your approach to solving the problem. -->
After using, pivot lets decide what should be index that is Primary key to identify each row, `index='month'` and what should be columns so we decide to have `columns='city'` and what should be values for these columns, so `values='temprature'` same like `pivot table in EXCEL`.
`pivoted = df.pivot(index='month', columns='city', value='temperature')`.
# 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:
    # pivot rows into columns
    pivoted = weather.pivot(index='month', columns='city', values='temperature')
    # pivoted.reset_index(inplace=True)
    # pivoted.drop(columns='index', inplace=True)
    return pivoted
```
['Pandas']