Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.4k views
in Technique[技术] by (71.8m points)

在更改表的列名时提示'000001.SZ' is not a valid column name

我在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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...