The Reshape Data Pivot solution is below.
15 Jan 2025•Python
Reshape Data Pivot
Python solution for Reshape Data Pivot.
Solution files
Python•reshape-data-pivot/solution.py
import pandas as pd
def pivotTable(weather: pd.DataFrame) -> pd.DataFrame:
return weather.pivot_table(index='month', columns='city', values='temperature', aggfunc='max')