pymongo code:
mycol = mydb["anomaly_output"] from_date = datetime.strptime("01-01-2018", \'%d-%m-%Y\') to_date = datetime.