return conn[db]

def read_mongo(db, collection, query={}, host='localhost', port=27017,
    username=None, password=None, no_id=True):
    """ Read from Mongo and Store into DataFrame """
db = _connect_mongo(host=host, port=port, username=username, password=
    password, db=db)
cursor = db[collection].find(query)
df = pd.DataFrame(list(cursor))
if no_id:
    del df['_id']
return df
Как импортировать данные из mongodb в pandas?