5b4d04de17457286fe4e5f3e0e8295db42d0f064,QUANTAXIS/QAFetch/QAQuery.py,,QA_fetch_index_min,#Any#Any#Any#Any#Any#Any#,618

Before Change


        {"_id": 0},
        batch_size=10000
    )
    if format in ["dict", "json"]:
        return [data for data in cursor]
    // for item in cursor:
    _data = pd.DataFrame([item for item in cursor])
    _data = _data.assign(datetime=pd.to_datetime(_data["datetime"]))
    // _data.append([str(item["code"]), float(item["open"]),
    // float(item["high"]), float(
    //     item["low"]), float(item["close"]), int(item["up_count"]),
    //     int(item["down_count"]), float(item["vol"]), float(item["amount"]),
    //     item["datetime"], item["time_stamp"], item["date"], item["type"]])

    // _data = DataFrame(_data, columns=[
    //     "code", "open", "high", "low", "close", "up_count", "down_count",
    //     "volume", "amount", "datetime", "time_stamp", "date", "type"])

    // _data["datetime"] = pd.to_datetime(_data["datetime"])
    _data = _data.set_index("datetime", drop=False)
    if format in ["numpy", "np", "n"]:
        return numpy.asarray(_data)
    elif format in ["list", "l", "L"]:
        return numpy.asarray(_data).tolist()
    elif format in ["P", "p", "pandas", "pd"]:
        return _data


def QA_fetch_future_day(
    code,

After Change



    res = pd.DataFrame([item for item in cursor])
    try:
        res = res.assign(
            volume=res.vol,
            datetime=pd.to_datetime(res.datetime)
        ).query("volume>1").drop_duplicates(["datetime",
                                             "code"]).set_index(
                                                 "datetime",
                                                 drop=False
                                             )
        // return res
    except:
        res = None

    // 多种数据格式
    if format in ["P", "p", "pandas", "pd"]:
        return res
    elif format in ["json", "dict"]:
        return QA_util_to_json_from_pandas(res)
        
    elif format in ["n", "N", "numpy"]:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 5b4d04de17457286fe4e5f3e0e8295db42d0f064
Time: 2020-04-05
Author: 11652964@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_index_min


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: fa93a0d733bd88e236e2b5090c433088b729d113
Time: 2020-08-04
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QATdx.py
Class Name:
Method Name: QA_fetch_get_stock_list


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 4113a6a3be19167a8c551f8ae20e849ac851e52c
Time: 2019-03-25
Author: zhongjy1992@outlook.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_index_day