我希望遍历数据框乘以上一年的数据框输出,保留并计算下一年。
此处的最佳做法的想法
df_19 =aus_19
df_20 = np.multiply(df_19, aus_20)
df_21 = np.multiply(df_20, aus_21)
df_22 = np.multiply(df_21, aus_22)
d_f23 = np.multiply(df_22, aus_23)
for i in range(0,4):
for j in range(1,5):
df_(19+i) = np.multiply(df_(19+i), aus_(19+j))
d['df_' + str(19+i)] = np.multiply(df.add_suffix('df_'+ str(19+i)), df.add_suffix('aus_'+ str(19+j)))