将数据框中的行值映射到熊猫中的列值?

时间:2020-04-01 13:49:44

标签: python pandas datetime time-series

    Q1     Q2     Q3     Q4
0   6.44   4.85   4.67   5.77

Dataframe df行值必须与

data=
[Timestamp('1996-03-31 00:00:00', freq='Q-DEC') #This has to mapped with Q1
[Timestamp('1996-06-30 00:00:00', freq='Q-DEC') #This with Q2
[Timestamp('1996-09-30 00:00:00', freq='Q-DEC') #This with Q3
[Timestamp('1996-12-31 00:00:00', freq='Q-DEC') #This with Q4

0 个答案:

没有答案