You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The result is not true ,since is_vacation is in the GroupVar of slide function, the first value of is_vacation=1 should be NA. But the result use the last value of is_vacation=0.
6 100000022 2019-07-22 1 12737.00 1 10855.01(should be NA)
This problem is confusing. If the GroupVar only have (store_code,day_of_week_ori),this fuction is valid only for dataframe with one store. If the store number>1, the same thing goes wrong!
Thanks a lot.
The text was updated successfully, but these errors were encountered:
tmp_store_test before
tmp_store_test
store_code sale_date day_of_week_ori payment_amount is_vacation
32 100000022 2019-10-14 1 10769.87 0
39 100000022 2019-10-21 1 10327.14 0
46 100000022 2019-10-28 1 9834.03 0
53 100000022 2019-11-04 1 8654.33 0
60 100000022 2019-11-11 1 10855.01 0
69 100000022 2019-07-22 1 12737.00 1
76 100000022 2019-07-29 1 13652.91 1
83 100000022 2019-08-05 1 11824.64 1
90 100000022 2019-08-12 1 12026.49 1
97 100000022 2019-08-19 1 12490.36 1
104 100000022 2019-08-26 1 12776.02 1
tmp_store_test after
tmp_store_test
store_code sale_date day_of_week_ori payment_amount is_vacation Data_lagged_7_pay
1 100000022 2019-10-14 1 10769.87 0 NA
2 100000022 2019-10-21 1 10327.14 0 10769.87
3 100000022 2019-10-28 1 9834.03 0 10327.14
4 100000022 2019-11-04 1 8654.33 0 9834.03
5 100000022 2019-11-11 1 10855.01 0 8654.33
6 100000022 2019-07-22 1 12737.00 1 10855.01
7 100000022 2019-07-29 1 13652.91 1 12737.00
8 100000022 2019-08-05 1 11824.64 1 13652.91
9 100000022 2019-08-12 1 12026.49 1 11824.64
10 100000022 2019-08-19 1 12490.36 1 12026.49
11 100000022 2019-08-26 1 12776.02 1 12490.36
The result is not true ,since is_vacation is in the GroupVar of slide function, the first value of is_vacation=1 should be NA. But the result use the last value of is_vacation=0.
6 100000022 2019-07-22 1 12737.00 1 10855.01(should be NA)
This problem is confusing. If the GroupVar only have (store_code,day_of_week_ori),this fuction is valid only for dataframe with one store. If the store number>1, the same thing goes wrong!
Thanks a lot.
The text was updated successfully, but these errors were encountered: