from pymongo import MongoClient
def downloadData(self, database, collection):
vectF = []
data = self.comm.getDB(database, collection)
for i in range(0,len(data)):
vectF.append(data[i]['sensor{0}'.format(i+1)])
return vectF
A simple function for find data of a collection from database using MongoDB and pymongo.
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.