Juntao Wang
Juntao Wang

性别: 注册于 2021-05-07

向TA求助
0金币数
2710 经验值
0个粉丝
主页被访问 1648 次

最近动态

2022-09-09 17:19 回答问题

示例代码如下: t = table(2022.08.01 2022.08.02 2022.08.03 as date, `000001.SZ`000002.SZ`000003.SZ as windCode, `1101`1102`1103 as industryCode) res = select iif(isNull(industryCode), 0, 1) from t pivot by date, windCode, industryCode nullFill!(res, 0)

2022-09-09 17:18 回答问题

示例代码如下: def f(t, i) { indCode = t[i][`indCode] indexCode = t[i][`indexCode] code = t[i][`code] dateStart = t[i][`date] dateEnd = t[i+1][`date] weight = t[i][`weight] totalMV = t[i][`totalMV] pholding = t[i][`pholding] jr = t[i][`jr] if(isNull(d

2022-09-09 17:17 回答问题

示例代码如下: def f(t, i) { windCode = t[i][`S_INFO_WINDCODE] code = t[i][`SW_IND_CODE] entryDate = t[i][`ENTRY_DT] removeDate = t[i][`REMOVE_DT] days = entryDate..removeDate days = days[weekday(days) between 1:5] return cj(table(windCode as windCode, co

2022-09-01 15:54 回答问题

参考:https://ask.dolphindb.net/question/2015

2022-08-29 14:54 回答问题

t1 = table(2021.01.01..2021.01.30 as date, take(`A`B`C`D`F`G`F, 30) as code) t2 = table(2021.01.15..2021.02.28 as date, take(`A`B`C`D`F`G`F, 45) as code) // 方式一 timer select date, code from lj(t1, t2, `date`code) where isNull(t2.date) and isNull(t2.code)

2022-08-29 14:38 回答问题

使用元编程sqlUpdate函数,动态构造需要置为0或者NULL的列。 sym = `C`C`C`C`MS`MS`MS`IBM`IBM time = [09:34:57, 09:34:59, 09:35:01, 09:35:02, 09:34:57, 09:34:59, 09:35:01, 09:35:01, 09:35:02] price= 50.6 50.62 50.63 50.64 29.46 29.48 29.5 174.97 175.02 t = select price from table(

2022-08-29 14:37 回答问题

d = dict(INT, ANY) d.dictUpdate!(append!, [1, 2, 3], [1, 1, 1]) // 方式一 open = matrix(INT, 2, 3, , 3) v = mstd(open, 2) d[5]=v // 方式二 open = matrix(INT, 2, 3, , 3) v = mstd(open, 2) d.dictUpdate!(append!, 5, [v], x -> x)

2022-07-22 15:53 回答问题

m * n 与 m * n 运算,对应位置运算。m * n 与 m * 1 分别按列对应位置运算。运算包括:+ - * \ 。 m1 = matrix(INT, 4, 3, , 5)m2 = matrix(INT, 4, 1, , 2)m3 = matrix(INT, 1, 3, , 2)m1 + m2m1 - m2m1 * m2m1 \ m2 // Incompatible vector/matrix sizem1 + m3m1 - m3m1 * m3m1 \ m3

2022-07-22 15:52 回答问题

示例代码如下: N = 100 tmp = table(take(`000001.SH, N) as index_code, take(`60 + format(rand(1..1000, N), "0000"), N) as secu_code, rand(1990.01.01..2000.01.01, N) as indate, rand(2015.01.01..2020.01.01, N) as outdate) // 方案一 timer { tmp2 = cj(tmp, tabl

2022-07-13 12:01 回答问题

示例代码: t = table(2022.07.04T09:45:00 2022.07.04T09:45:00 2022.07.04T09:45:00 2022.07.04T09:45:00 as time, `A`B`C`D as sym, 1.0 2.0 3.0 4.0 as value) syms = `A`B`C`D`E`F symsTmp = syms[not syms in (exec sym from t)] insert into t(sym) values(symsTmp) select