在将数据插入数据库时,使用RxSqlServerData&rx_featureize时,“在*之后的类型对象参数必须是iterable,而不是NoneType”错误

2024-05-23 21:15:49 发布

您现在位置:Python中文网/ 问答频道 /正文

我在数据库机器学习服务中使用SQL Server 2017和python(revoscalepymicrosoftml)创建一个带有Jupyter Server notebook的模型。 我成功地将我的数据存储到我的数据集上。 我现在正试图使用与使用rx_featurize连接数据库时使用的相同的连接字符串来存储插入(或写入)这些数据帧值,但是我得到了这个错误type object argument after * must be an iterable, not NoneType。在

下面是我正在运行的代码:

output_df = pd.DataFrame(data = predictions, index=unique_id, columns=['predictions'])

from microsoftml import rx_featurize

rx_featurize(data=output_df,output_data=RxSqlServerData(connection_string=connection_string_1, table = 'predicted', database_name='banktest'), overwrite = True)

错误如下:

^{pr2}$

microsoftml是安装python服务时安装的库。在

下面是我为什么使用rx_featurize将数据插入数据库的链接。 [Using revoscalepy to insert data into a database

我还创建了一个空表,根据数据帧预测列,但仍然显示错误


Tags: 数据数据库dfoutputdatastringserver错误