from pymongo import MongoClient 
client=MongoClient('localhost',27017)
db=client.adv.message
from datetime import datetime
import pandas as pd
#db.insert_one({'player_id':js2['player_id'],'message':js2['message'],
# 'label':label,'predict_time':datetime.datetime.now()})

#按照时间查询
q1={"predict_time":{"$gte" :datetime(2019,9,25) ,"$lte": datetime(2019,9,28)}}
l1=list(db.find(q1))

#l1=list(db.find({}))
df=pd.DataFrame(l1)