在数据清理过程中,经常会遇到以文本储存的日期型数据,这种数据不能直接进行分析,需要先将其转化为以数值存储的格式. 首先准备数据集: data data1; input a :$10. b :$10. c :$10.; label a = label_a b = label_b c = label_c; cards; 2020-01-02 03FEB2021 2020-03-04 2020-03-04 9MAR2022 2020-09-1 ; run; 接下来使用input函数将变量a转化为数值存…
笨办法学python第36节,我写的代码如下: from sys import exit def rule(): print "Congratulations! You made the right choice." print "But is also a terrible choice." print "You have to abide by the contract of the devil." print "Input you…