将数据框数据加载到Impala表时出错
DB = conn.cursor()
for row in fourth_set:
SQL = ('''Insert into Boots_retailer(sale_date, product, Assessment, weekno, store_Number, volume, turnover, turnover_missing, Inv_Cubic, XGB, KNN)
values(?,?,?,?,?,?,?,?,?,?,?)''' )
Values = row['Sale_date'], row['product'], row['Assessment'], row['weekno'],row['store_number'],
row['volume'],row['turnover'],row['turnover_missing'],row['Inv_Cubic'],row['XGB'],row['KNN']
har = DB.execute(SQL, Values)
connection.commit()
为什么这么坏男人?正文必须至少包含30个字符