MongoDB is a general-purpose, document-based, distributed database built for modern application developers and the cloud. It is a document database, which means it stores data in JSON-like documents. This is an efficient way to think about data and is more expressive and powerful than the traditional table model.
Delete_many() is used when one needs to delete more than one document. A query object containing which document to be deleted is created and is passed as the first parameter to the delete_many().
Example 1: Deleting all the documents where the name starts with ‘A’.
2 documents deleted !!
1 documents deleted !!
- MongoDB and Python
- Python MongoDB - Query
- Python MongoDB - Sort
- Python MongoDB - Update_one()
- Python Mongodb - Delete_one()
- Python MongoDB - Find
- Python MongoDB - find_one_and_delete Query
- Geospatial Queries with Python MongoDB
- Python MongoDB - find_one_and_update Query
- Python MongoDB - Limit Query
- How to fetch data from MongoDB using Python?
- Python MongoDB - Update_many Query
- Python MongoDB - find_one Query
- Python MongoDB - create_index Query
- Python MongoDB - insert_one Query
- Create a database in MongoDB using Python
- How to access a collection in MongoDB using Python?
- Python MongoDB - drop_index Query
- Python MongoDB - insert_many Query
- Guide to Install MongoDB with Python | Windows
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.