- Clone the repo.
git clone git@github.com:mnguyenngo/mongo-helpers.git
- Go to the cloned repo.
cd mongo-helpers
- Install the package.
pip install .
(mongo_helper syntax in comments)
client = MongoClient(host, address)
client.database_names() # use get_db_names()
db = client[db_name]
db.collection_names() # use get_collection_names(db)
c = db[collection_name]
df = pd.DataFrame(list(c.find())) # use convert_db_to_df(db, c)