Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

我在DolphinDB database中写了下列代码:

//生成股票相关性矩阵
corrMatrix=cross(corr,retMatrix,retMatrix)
col_s = corrMatrix.columnNames()//矩阵的列名
table_corrMatrix  = table(corrMatrix).rename!(col_s) //将显示的列名col0,col1改成对就的股票名000001.SZ,000002.SZ

因为table_corrMatrix表的列名显示的是col0,col1...(如下图所示),
image.png

我想改成实际的股票名称000001.SZ,000002.SZ等等,但我在GUI中执行上述代码时出现错误:

table_corrMatrix = ::rename!(table(corrMatrix), col_s) => '000001.SZ' is not a valid column name.

请教如何改动才能实现我要的效果?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.3k views
Welcome To Ask or Share your Answers For Others

1 Answer

DolphinDB中的表字段名称必须是字母开头


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...