在这上面坐了一会儿。我有数据库和字典。 db的结构如下:
{ 'label': 'Argiope',
'uri': 'http://dbpedia.org/resource/Argiope_(spider)',
'description': 'The genus Argiope includes rather large and spectacular spiders that often ...',
'name': 'Argiope',
'synonym': ["One", "Two"],
'classification': {
'family': 'Orb-weaver spider',
'class': 'Arachnid',
'phylum': 'Arthropod',
'order': 'Spider',
'kingdom': 'Animal',
'genus': None
}
}
现在我要做的是,通过在classification字段中创建一个新条目来更新数据库。键总是相同的“binomialAuthority”和值,我的dict值。但是我只想更新label等于key的那些数据集(所以我只更新正确的数据集)
我从以下几点开始:
^{pr2}$但这不起作用,仍然缺少状况。有人吗知道怎么做吗?在
如果我正确理解您的问题,您的更新应该类似于:
编辑
再读一遍你的问题,也许你想要的是:
^{pr2}$相关问题 更多 >
编程相关推荐