我在DolphinDB database GUI中执行下面代码往字典插入数据:
t=table(1 2 3 as x, 4 5 6 as y);
d=dict(`x`y, 4 7);
tableInsert(t, d);
报错:
The number of table columns doesn't match the number of columns to append.
请问是哪里写错了呢?
我在DolphinDB database GUI中执行下面代码往字典插入数据:
t=table(1 2 3 as x, 4 5 6 as y);
d=dict(`x`y, 4 7);
tableInsert(t, d);
报错:
The number of table columns doesn't match the number of columns to append.
请问是哪里写错了呢?
1 回答1.4k 阅读
1 回答2k 阅读✓ 已解决
1 回答2.2k 阅读✓ 已解决
1 回答1.9k 阅读✓ 已解决
1 回答2.2k 阅读✓ 已解决
tableInsert使用字典作为输入的时候,字典的值类型必须是ANY。这样根据字段名称,可以快速获取一个tuple,插入到table。请把代码修改为: