举例: x1=9..0 x2=1 3 5 x3=x1[x2] x4=copy(x1) x4[:]=NULL x4[x2]=x3
回答于 2022-08-05 09:46
建议使用textChunkDS 函数来导入,这样大文件会被切分为数据源,不会单次事务占用过大内存例子:def writeData(files, dirPath, dbName, tbName){ login("admin", "123456") pt = loadTable(dbName, tbName) for(file in files ){ filePath = dirPath+"/"+file print(filePath) schemaTB =...
回答于 2022-07-22 09:20
方法1: aa=0..9$10:1bb=10..19$10:1logicalMask=bb>16aa[logicalMask]=bb[logicalMask].dropna()//因为筛选过之后,并不会剔除null值,所以要dropna除掉 方法2: iif(bb>16,bb,aa) 推荐适用第2种方法,代码更简洁,性能也更快。
回答于 2022-07-15 10:37
可以,使用sortBy!函数: https://www.dolphindb.cn/cn/help/FunctionsandCommands/FunctionReferences/s/sortBy!.html?highlight=sortby
回答于 2022-07-14 10:23
3种办法: 1.在C++层面,创建一个全局的外部字典变量。您用脚本触发创建对象的C++动作,然后在C++层面把您这个对象存入这个字典里。相当于完全在C++层面管理这个实例。例子:https://gitee.com/dolphindb/DolphinDBPlugin/blob/master/zmq/src/pluginZmq.cpp 代码里有个外部字典:DictionarySP status_dict = Util::creat...
回答于 2022-07-14 09:59
目前不支持。 可以通过share函数,将普通内存表共享,共享表是支持多个线程同时写入的。 将普通表申明成共享表的语句: t1= table(1 2 3 as id, 4 5 6 as value); share t1 as table1;
回答于 2022-07-14 09:44
getOS函数 https://www.dolphindb.cn/cn/help/FunctionsandCommands/FunctionReferences/g/getOS.html?highlight=getos
回答于 2022-07-14 09:35
目前的办法,只有写二进制数据writeObject到文件。 读的时候readObject可以读出来 也可以矩阵转表,saveText保存表
回答于 2022-06-10 09:56