![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pymongo
JoshuaJosue
这个作者很懒,什么都没留下…
展开
-
pymongo创建索引、更新、删除
索引创建 ## collection 为数据集合collection.create_Index({'需创建索引字段': 1})collection.ensure_Index({'需创建索引字段': 1})## 获取索引信息,数据库中使用db.getCollection('tablename').getIndexes()tip:getIndexex() 返回值中 key 为所创...原创 2018-08-20 11:40:07 · 9241 阅读 · 1 评论 -
pymongo查找指定字段的不同值
collection.distinct('需查找的字段')原创 2018-08-20 11:44:43 · 3788 阅读 · 0 评论