4113a6a3be19167a8c551f8ae20e849ac851e52c,QUANTAXIS/QAFetch/QAQuery.py,,QA_fetch_index_day,#Any#Any#Any#Any#Any#,256

Before Change


                "$lte": QA_util_date_stamp(end),
                "$gte": QA_util_date_stamp(start)}}, {"_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(date=pd.to_datetime(__data["date"]))
            // __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["date"]])

        // 多种数据格式
        if format in ["n", "N", "numpy"]:
            __data = numpy.asarray(__data)
        elif format in ["list", "l", "L"]:
            __data = __data
        elif format in ["P", "p", "pandas", "pd"]:
            // __data = DataFrame(
            //     __data, columns=["code", "open", "high", "low", "close", "up_count", "down_count", "volume", "amount", "date"])
            // __data["date"] = pd.to_datetime(__data["date"])

After Change



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

        if format in ["P", "p", "pandas", "pd"]:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


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: catalyst-cooperative/pudl
Commit Name: d9187309769bd34e34294003cef5290e512c6fbc
Time: 2020-07-31
Author: zane.selvans@catalyst.coop
File Name: src/pudl/transform/eia861.py
Class Name:
Method Name: _harvest_associations


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