gpt4 book ai didi

dolphindb - 使用 Python API 将 DataFrame 作为具有数组向量的表上传到服务器时出错

转载 作者:行者123 更新时间:2023-12-05 02:25:49 25 4
gpt4 key购买 nike

我尝试了 DolphinDB Python API documentation 中给出的示例,使用 table 方法将具有不同长度数组的 DataFrame 作为具有数组向量的表上传到 DolphinDB。

版本信息:

python 3.7

Windows 上的 DolphinDB 服务器 1.30.19

Python API 1.30.19.2

这是脚本:

import numpy as np
import pandas as pd
import dolphindb as ddb
s = ddb.session()
s.connect("localhost", 8848, "admin", "123456")
df = pd.DataFrame({
'value': [np.array([1,2,3,4,5,6,7,8,9],dtype=np.int64),np.array([11,12,13,14],dtype=np.int64),np.array([22,13,11,12,13,14],dtype=np.int64)]
})
tmp = s.table(data=df, tableAliasName="testArrayVector")

print(s.loadTable("testArrayVector").toDF())

我遇到了这些错误:

enter image description here

enter image description here

最佳答案

DolphinDB 服务器 1.30 不支持数组向量作为表列。

下载2.00服务器版本并再次运行脚本。

关于dolphindb - 使用 Python API 将 DataFrame 作为具有数组向量的表上传到服务器时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74297380/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com