【问题标题】:The error of “The key type can't be BOOL, ANY or DICTIONARY”“key type can't be BOOL, ANY or DICTIONARY”的错误
【发布时间】:2021-10-02 21:07:51
【问题描述】:

我在 DolphinDB 数据库 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

解决办法是什么?

【问题讨论】:

    标签: sqldatatypes dolphindb


    【解决方案1】:

    x 是一个元组,数据类型是 ANY。字典的键类型不能是任何类型。要解决此问题,请确保 X 是正则向量。

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

    【讨论】:

      猜你喜欢
      • 2023-01-27
      • 2022-01-09
      • 1970-01-01
      • 2019-01-05
      • 1970-01-01
      • 2022-01-26
      • 2021-10-06
      • 2022-11-08
      • 2021-11-23
      相关资源
      最近更新 更多