import json
df = pd.DataFrame.from_dict({'A': {(1): datetime.datetime.now()}})
df
records = list(json.loads(df.T.to_json()).values())
db.myCollection.insert(records)
Insert a Pandas Dataframe into mongodb using PyMongo