表价:
ID Date OPEN HIGH Low CLOSE
417 9/23/1994 24.399 24.399 24.399 24.399
417 9/28/1994 23.3 23.3 23.3 23.3
417 9/29/1994 23.35 23.35 23.35 23.35
417 9/30/1994 22.55 22.55 22.55 22.55
418 5/22/2014 47.299 47.299 47.299 47.299
418 5/23/2014 47.299 47.299 47.299 47.299
418 5/26/2014 47.1 47.1 47.1 47.1
418 5/27/2014 47.35 47.35 47.35 47.35
我想要这样的结果:
id Open HIGH LOW CLOSE PervClose Change Change%
417 22.55 22.55 22.55 22.55 23.35 22.55-22.55 (22.55-22.55)/100
418 47.35 47.35 47.35 47.35 47.1 47.35-47.1 (47.35-47.1)/100
注:((prevclose为previousdateclose,change=close-prevclose),change%=(close-prevclose)/100)
我不知道 columns 的逻辑
HIGH
,LOW
...所需的输出: