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

Before Change


    //     "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: 4

Non-data size: 7

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: 4113a6a3be19167a8c551f8ae20e849ac851e52c
Time: 2019-03-25
Author: zhongjy1992@outlook.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_index_day


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 807f63ce2e2bf07b268458e4855a5d3b57b0e4d9
Time: 2018-07-09
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_quotations


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 807f63ce2e2bf07b268458e4855a5d3b57b0e4d9
Time: 2018-07-09
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_quotation