description |
---|
Fetch data from a mongodb and get a dataframe |
{% embed url="https://www.mongodb.com/" %} Website {% endembed %}
{% hint style="danger" %} You must Connect before any other methods {% endhint %}
user = "my user"
passwd = "my passwd"
host = "url"
port = 9090
ftp = naas_drivers.mongo.connect(host, port, user, passwd)
collection_name = "col"
db_name = "db_name"
naas_drivers.mongo.get(collection_name, db_name)
collection_name = "col"
db_name = "db_name"
data = # a dataframe
naas_drivers.mongo.send(data, collection_name, db_name)
{% embed url="https://docs.mongodb.com/" %}