Python MongoDB Drop Collection

Python MongoDB Drop Collection

Delete Collection

You can delete a table, or collection as it is called in MongoDB, by using the drop() method.

Example

Delete the “customers” collection:

Run example »

The drop() method returns true if the collection was dropped successfully, and false if the collection does not exist.

ArmenianEnglish