示例#1
0
文件: app.py 项目: mkarlovc/ts
def indicator_d(textA, textB, d):
    indicatordf = data.getIndicatorDf(textA+"/"+textB)
    output = []
    for i,idx in enumerate(indicatordf.index):
        if i > len(indicatordf)-int(d):
            output.append({"count":indicatordf.ix[idx], "date":idx.strftime('%Y-%m-%d')})
    return Response(json.dumps(output), mimetype='application/json')
示例#2
0
文件: app.py 项目: mkarlovc/ts
def indicator(textA, textB):   
    indicatordf = data.getIndicatorDf(textA+"/"+textB)
    output = []
    for idx in indicatordf.index:
        output.append({"count":indicatordf.ix[idx], "date":idx.strftime('%Y-%m-%d')})
    return Response(json.dumps(output), mimetype='application/json')