python好不好用_但python以前不太好用
ValueError: Buffer dtype mismatch, expected 'Python object' but got 'long long'
這些東西得到的代碼與之前運(yùn)行良好的代碼完全相同
有一個(gè)欄目叫買家。下面的代碼用于收集buyer列中具有'st'值的行。現(xiàn)有的df是已經(jīng)存在的df,我為st_only_existing_df創(chuàng)建了一個(gè)變量。在
^{pr2}$
所以從新下載的數(shù)據(jù)(st_essential_數(shù)據(jù)框序號(hào))對(duì)于st_only_existing_df,我比較了ordernum,如果在新下載的數(shù)據(jù)中沒有數(shù)據(jù),那么我將canceled消息放入orderstatus。在canceled_df = st_only_existing_df[~st_only_existing_df.ordernum.isin(st_essential_df.ordernum)]
for index, row in canceled_df.iterrows():
odrnum = row['ordernum']
c.execute("update collection set orderstatus='canceled' where ordernum=?", (odrnum,))
conn.commit()
上面的代碼運(yùn)行得很好。但現(xiàn)在不是了。我不知道它為什么返回“l(fā)ong long”。在
事實(shí)上,我需要從許多不同的買家那里下載訂單數(shù)據(jù)。其中之一是“我們”。在處理“we”數(shù)據(jù)導(dǎo)入代碼時(shí),我發(fā)現(xiàn)了相同的錯(cuò)誤。但它消失了。
在我成功地從'we'數(shù)據(jù)輸入到sqlite3之后,db file得到了'we'數(shù)據(jù),突然,st db input就不工作了。
我不認(rèn)為那會(huì)有什么不同,但是。。。。在
有人能給我點(diǎn)線索嗎?在
總結(jié)
以上是生活随笔為你收集整理的python好不好用_但python以前不太好用的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: sequel mysql8.0_sequ
- 下一篇: python学生类出不来中文_求教Pyt