I'm trying to figure a quick way to replace blank strings ('') that I have in a lot of my documents (across many fields) with MongoDB's null value.
In MongoDB docs, I was hoping to use ReplaceAll, but I can't figure out how to execute the same thing in pymongo unless I do replace_one().
Is there an efficient way to do this?
update_manymethod for this purpose. I guess you need to specify all the fields that requires the update - both in the query filter and the update.