2

我想在dolphidndb中创建一个包含很多列的表,但是我找不到方便的方法?

如果我使用t = table(size:capacity,names,types),当我有很多很多列时,不方便修改和添加或删除一些列。

colNames = ["col1","col2","col3","col4","col5","col6","col7","col8" ...]

colTypes = [STRING,DOUBLE,INT,LONG,SYMBOL,LONG,DATE,TIME,TIMESTAMP ...]

t = table(100:0,colNames,colTypes)

有没有更方便的方法来完成这项工作?

4

1 回答 1

0

The table function in DolphinDB has another way to organize columns.Instead of specifying a column name list and a column type list, one can specify columns one by one.

t= table(array(STRING, 0) as col1,
         array(DOUBLE, 0) as col2,
         ...
         )
于 2019-06-28T02:26:32.223 回答