How To Add Value To Existing Value Using Pymongo
I am trying to update/create a new dataset and combine the previous value with the new one. This is how it looks like in my Python script right now. dailyDataset = { 'pId' :
Solution 1:
You can use the $inc
operator:
db[dbName].update( { 'pId' : publisher, 'oId' : offer.id }, {"$inc" : {'payout':1.22}}, True)
Post a Comment for "How To Add Value To Existing Value Using Pymongo"