1天前 回答问题
报错信息: To create a new database, the directory [F:/DolphinDB/Data] must be empty.' db_path = "F:/DolphinDB/Data" 是本地磁盘路径,因此创建的是磁盘数据库,磁盘数据库会要求这个目录必须是个空文件夹,现在我们也不怎么推荐用磁盘数据库,建议改成 "dfs://" 开头的路径,创建分布式数据库替代。
2天前 回答问题
此处导入数据的时候 schema 无需进行类型变更,loadTextEx 的过程中,数据先根据给定的 schema 导入内存,然后再基于该内存表进行 transform。由于您的数据时间列不包含日期列,因此不能指定为 TIMESTAMP。
2天前 回答问题
在1.30.19.4及之后版本的 Python API 中,用户在使用 TableAppender 类的 append 方法写入数据时,可能会收到如下警告:UserWarning: Pandas doesn't allow columns to be created via a new attribute name - see https://pandas.pydata.org/pandas-docs/stable/indexing.html#attribute-access该警告并不会对程序执行造成任何
2天前 回答问题
如果是社区版,单节点内存上限是 8G,您的 csv 文件 1.2 G, 导入后类似变量 t 这种临时变量也占了内存,检查一下是否是临时变量和导入的数据加起来超过了 8G, 另外可以用 loadTextEx 直接导入分布式表,不需要先 loadText 再 append, 这样可以避免过大的中间表变量占用内存
5天前 回答问题
n = 100000 records_from_old = table(rand(10000, n) as id, rand(100.0, n) as val) records_from_new = table(rand(11000, n) as id, rand(100.0, n) as val) timer re1=select * from records_from_old where not exists(select * from records_from_new where records
2023-06-02 17:35 发起提问
2023-06-02 17:07 回答问题
ols 目前不支持输入一个非满秩的矩阵,可以参考这个问答:https://ask.dolphindb.net/question/2423 判断一下输入的 test.RET 是否是满秩的矩阵
2023-05-31 16:22 发起提问
2023-05-31 11:06 回答问题
sql((sqlCol(`date),sqlCol(code,ratios, `ret)),table ).eval() sqlCol 第一个参数为列名字符串,因此上述语句计算的是 table 中列名为 `000905 这列的 ratios。 sql((sqlCol(`date),sqlColAlias(<ratios(code)>,`ret)),table).eval() sqlColAlias 第一个参数以 metaCode 传入,根据表达式计算的是 table 中列名为 `cod
2023-05-31 10:57 回答问题
date1 = rand(getMarketCalendar("SSE",2023.01.01,2023.12.31), 100000).sort!() // 方法一” re = array(DATE) timer for(d in date1){ re.append!(last(getMarketCalendar("SSE",weekBegin(d),weekEnd(d)))) } // 方法二:向量化计算 timer { mday = getMarketCalendar("SSE", 2023.0