0
나는 매일 시계열 데이터를 가지고있다. 월간 요인을 곱하여 해당 시계열 값을 수정하려고합니다.팬더의 시계열 데이터 다루기
이내 시계열 데이터는 다음과 같습니다 : 내가 무슨 짓을했는지
mon_slope:
month
January -0.168627
February -0.165102
March -0.112321
April -0.112232
May -0.080092
June -0.129905
July -0.078751
August -0.095756
September -0.090188
October -0.109919
November -0.155380
December -0.137885
Name: slope, dtype: float64
:
jan_corr = pd.DataFrame(model[model.index.month ==1]*mon_slope.ix[0][1])
feb_corr = pd.DataFrame(model[model.index.month ==2]*mon_slope.ix[1][1])
mar_corr = pd.DataFrame(model[model.index.month ==3]*mon_slope.ix[2][1])
..................
..................
final = pd.concat([jan_corr,feb_corr,mar_corr])
model:
2010-01-30 0.008909
2010-01-31 0.007562
2010-02-01 0.
2010-02-02 0.010286
2010-02-03 0.012244
2010-02-04 0.011367
2010-02-05 0.010800
2010-02-06 0.007610
2010-02-07 0.006534
2010-02-08 0.004721
...
2015-12-02 0.005415
2015-12-03 0.004358
2015-12-04 0.006844
2015-12-05 0.002373
내가 좋아하는 월간 요인이처럼 수동 보정처럼했다
하지만 이것이 올바른 방법이 아니라고 확신합니다. 그렇게 할 수있는 간단한 방법이있다 :
@COLDSPEED, 그건 내가 찾던 것입니다. 고마워요 :) – bikuser
@bikuser 기꺼이 도와 드리겠습니다! –