I have installed mongo-db from the Jupyter notebook using !pip install pymongo
.
Now how to start mongodb. Is there any way to start mongodb through Juyter Notebook.
from pymongo import MongoClient
client = MongoClient()
#print (client)
#client = MongoClient('mongodb://localhost:27017')
db = client['test-database']
#print (db)
courses = db.courses
#print (courses)
course = {
'author':'Mak',
'course':'Data',
'price': 100,
'rating':5
}
result = courses.insert_one(course)
I am getting ServerSelectionTimeoutError Traceback (most recent call last)
since there is no mongodb started