📅  最后修改于: 2022-03-11 14:47:17.934000             🧑  作者: Mango
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 """