title: Connecting to MongoDB using PyMongo on Jupyter notebook
body: <p>I have created an account with Atlas and now I am trying to retrieve some information from the database. My native language is R, so I inserted the "iris" data set into the collection called "table".
  To show that there is data in my new database "test", I use the mongolite command (this is the R pymongo):</p>
  
  <pre><code>#m is my client connection
  m$count()
  [1]5490
  </code></pre>
  
  <p>The problem is connecting with python. I am currently on Jupyter Notebook. Here is the code.</p>
  
  <pre><code>import pymongo as pm
  import pprint
  import requests
  
  url= "mongodb://jordan:*************@jordandb-shard-00-00-ykcna.mongodb.net:27017,jordandb-shard-00-01-ykcna.mongodb.net:27017,jordandb-shard-00-02-ykcna.mongodb.net:27017/test?ssl=true&amp;replicaSet=JordanDB-shard-0&amp;authSource=admin&amp;retryWrites=true"
  
  client = pm.MongoClient(url)
  print(client)
  [out]Database(MongoClient(host=['jordandb-shard-00-02-ykcna.mongodb.net:27017', 'jordandb-shard-00-01-ykcna.mongodb.net:27017', 'jordandb-shard-00-00-ykcna.mongodb.net:27017'], document_class=dict, tz_aware=False, connect=True, ssl=True, replicaset='JordanDB-shard-0', authsource='admin', retrywrites=True), 'test')
  #I am assuming this means I am connected
  </code></pre>
  
  <p>When I call any methods on the database I get the error.</p>
  
  <pre><code>db = client.test #test is name of collection
  db.iris.find_one({})
  
  ServerSelectionTimeoutError               Traceback (most recent call last)
  &lt;ipython-input-15-ab74ef5f0195&gt; in &lt;module&gt;()
  ----&gt; 1 db.iris.find_one({})
  
  /opt/conda/lib/python3.6/site-packages/pymongo/collection.py in find_one(self, filter, *args, **kwargs)
     1260 
     1261         cursor = self.find(filter, *args, **kwargs)
  -&gt; 1262         for result in cursor.limit(-1):
     1263             return result
     1264         return None
  </code></pre>
  
  <p>I would like to be able to connect and start exploring the data in my "test" data set by using methods like, list_database_names(), list_collection_names() etc.. Thank you kindly </p>