输入
需要输出
我尝试了 df = df.stack() 但它没有将日期显示为单独的列。
将您的数据转换为 pandas 数据框并使用:
import pandas as pd pd.melt(df, id_vars=['Date'])