def read_mongo(collection): cursor = collection.find({}) df = pd.DataFrame(list(cursor)) return df
Now when I execute this command
db