在Pandas的另一列上输入少量值

I have a week level data which i would like make into a column. This is the input enter image description here

Here is how i want the output to look like: enter image description here

评论
  • 你太小
    你太小 回复

    采用:

    df = df.set_index([df['Week'] % 100, df['Week'] // 100])['Sales'].unstack()