聚集 collection??? pymongo只有在插入数据到collection里去,如果collection不存在,才会建collection的
from pymongo import MongoClient
client = MongoClient('mongodb://localhost:27017/')
db = client.test_database
coll= db.test_collection
如果你用coll.insert() 插了数据进去
那么就会在mongodb里面建了个库test_database,并建了个collection名字叫test_collection