Answers for "fast way to load mongodb data into python list"

0

fast way to load mongodb data into python list

import pymongo
import numpy as np
""" Connection ...."""
movie_raw = db["collection"].find({})
""" Loading """
count = movie_raw=count()
data_arr = np.empty(count, dtype=...)
for index, movie in enumnerate(movie_raw):
  data_arr[i] = movie
""" Saves alot of time instead of # list(movie_raw) # when loading large DBs """
Posted by: Guest on September-09-2021

Code answers related to "fast way to load mongodb data into python list"

Python Answers by Framework

Browse Popular Code Answers by Language