I have a 0.7 GB MongoDB database containing tweets that I\'m trying to load into a dataframe. However, I get an error.
MemoryError:
My
The from_records classmethod is probably the best way to do it:
classmethod
from pandas import pd import pymongo client = pymongo.MongoClient() data = db.mydb.mycollection.find() # or db.mydb.mycollection.aggregate(pipeline) df = pd.DataFrame.from_records(data)