python 获取当前时间及前一天时间
import datetime
from pandas.tseries.offsets import Day
now_time =datetime.datetime.now()#获取当前时间
yes_time = (now_time -1*Day()).strftime('%Y-%m-%d')#格式化
import datetime
from pandas.tseries.offsets import Day
now_time =datetime.datetime.now()#获取当前时间
yes_time = (now_time -1*Day()).strftime('%Y-%m-%d')#格式化