我正在尝试使用以下python代码更新Postgres表(Table1)中的一列
for i in range(0,len(df)):
QUERY=""" UPDATE "Table1" SET "var"='%s' WHERE "Table"."id"='%s' """
% (df['sum'][i], df['id'][i])
pd.read_sql_query(QUERY,con=engine)
它正在抛出以下错误消息。你知道吗
ResourceClosedError: This result object does not return rows. It has been closed automatically.
你能告诉我怎么解决这个问题吗?你知道吗
目前没有回答
相关问题 更多 >
编程相关推荐