Answers for "find size of mongodb collection python"

1

find size of mongodb collection python

from pymongo import MongoClient


client = MongoClient(host = 'mongodb://localhost',port = 27017)
db = client['YOUR_DATABASE']
signal_db = db['YOUR_COLLECTION_NAME']

# size of Collection items
print(signal_db.estimated_document_count())
Posted by: Guest on March-23-2022

Code answers related to "find size of mongodb collection python"

Python Answers by Framework

Browse Popular Code Answers by Language