reset data pivot
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

# 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:
    ans = weather.copy()
    
    # Drop rows where 'temperature' is NaN
    ans = ans.dropna(subset=['temperature'])
    
    # Convert 'temperature' to integer type
    ans['temperature'] = ans['temperature'].astype(int)
    
    # Create pivot table
    ans = ans.pivot_table(index='month', columns='city', values='temperature', aggfunc='mean')
    
    # Reset index and set 'month' as the first column
    ans.reset_index(inplace=False)
    
    # Return the final DataFrame
    return ans

```
['Pandas']