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的GUI中运行下列代码:


x=(int128("2e8ca9773da3a99f2c87a623ac34f242"),int128("2e8ca9773da3a99f2c87a623ac34f243"))

y=1..2

dict(x, y); 

报异常:

dict(x, y) => The key type can't be BOOL, ANY or DICTIONARY

请问为什么不行?


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

1 Answer

要用中括号,圆括号是tuple

x=[int128("2e8ca9773da3a99f2c87a623ac34f242"),int128("2e8ca9773da3a99f2c87a623ac34f243")]
y=1..2
dict(x, y);  

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

548k questions

547k answers

4 comments

86.3k users

...