Here you have the very quickest way. Using the insert_many method from pymongo 3 and ‘records’ parameter of to_dict method.
db.collection.insert_many(df.to_dict('records'))
Here you have the very quickest way. Using the insert_many method from pymongo 3 and ‘records’ parameter of to_dict method.
db.collection.insert_many(df.to_dict('records'))