0
我有这个foll。据帧:垂直复制熊猫数据帧
Month Day season
0 4 15 current
1 4 16 current
2 4 17 current
3 4 18 current
4 4 19 current
5 4 20 current
我想复制它,像这样:
Month Day season
0 4 15 current
1 4 16 current
2 4 17 current
3 4 18 current
4 4 19 current
5 4 20 current
6 4 15 past
7 4 16 past
8 4 17 past
9 4 18 past
10 4 19 past
11 4 20 past
我可以用它复制:
df.append([df]*2,ignore_index=True)
但是,我怎么复制,使得season
列有past
作为重复值而不是current