我想知道是否有一种方法可以用一个值列表来索引一个DataFrame,这样当一个键不存在时,就会抛出一个KeyError而不是返回NaN。KeyError: 'the label [type3] is not in the [index]'df.loc["A", ["type2", "type3"]]type3 NaN有一
我想循环遍历来自filter by查询的结果集,并基于几个if检查更新/插入到我的数据库中。self.name).update({Comic.comicName : self.name})
db.session.commit() 在for i in checkName循环中抛出错误给出了TypeError: list indices must be integers or slices, not Comic错误,检查checkName变量</em