我有一个因子表,想给表中某些行的所有因子列都加上一个数,demo如下:
factor=table(now() as tradeTime,`600009 as secID,1.0 as factor1,2.0 as factor2,3.0 as factor3,4.0 as factore4,5.0 as factor5)
for(i in factor.columnNames()){
if(left(i,6)!="factor")
continue
update!(factor, i, i + 10)
}
上述代码在DolphinDB database的GUI中执行会报错如下:
The data type of the new values does not match the data type of column factor1
我把10改成10.0也不行,请问是什么原因?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…