Python MongoDB

MongoDB Delete

Deleting documents

MongoDB Delete

To delete a record, or document as it is called in MongoDB, we use the delete_one() method.

Delete Document

myquery = { "address": "Mountain 21" }
mycol.delete_one(myquery)