2889. Reshape Data Pivot

Обновлено: 2024-03-12
1 мин
[]

Содержание

LeetCode problem 2889

import pandas as pd

def pivotTable(weather: pd.DataFrame) -> pd.DataFrame:
    return weather.pivot(index='month', columns='city', values='temperature')