Feb-22-2020, 05:37 PM
(This post was last modified: Feb-22-2020, 05:37 PM by new_to_python.)
Thanks. By using 1.207707 as the old value and -0.558628 as the new value, I got -1.462553 as calculated by ts/ts.shift(1)-1. How come 1.207707 is the old value? The original (old) value in ts on 2000-04-30 is -0.558628. That is why I treated it as an old (original) value. It got updated to the new value of 1.207707.
Am I correct that for the discussion here, old value refers to the value in the previous timestamp in the original ts (i.e. value on 2000-3-31) rather than the original value in ts (i.e. value on 2000-04-30) that is being updated?
Am I correct that for the discussion here, old value refers to the value in the previous timestamp in the original ts (i.e. value on 2000-3-31) rather than the original value in ts (i.e. value on 2000-04-30) that is being updated?