Created
April 27, 2015 09:30
-
-
Save riccardoscalco/4adc9ed63bf4f8fb2082 to your computer and use it in GitHub Desktop.
Drop Collection with Pymongo
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pymongo | |
from pymongo import MongoClient | |
# Removes a collection from the database. | |
# http://docs.mongodb.org/manual/reference/method/db.collection.drop/ | |
client = MongoClient() | |
db = client.dbname | |
db.drop_collection('collectionName') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment