What is the proper way to create a Pandas DataFrame from MongoEngine result?

Viewed 26

I can do the following to get a data frame.

json_data = DocumentClass.objects(some_field=some_value).to_json()
df = json_normalize(json.loads(json_data))

But it involves creating an intermediate json object which is not necessary. If anybody knows a better way, please share.

0 Answers
Related