09d092ec058f3a4df8884e12b1144616d66ca264,QUANTAXIS/QAFetch/QAQuery.py,,QA_fetch_quotations,#Any#Any#,334

Before Change


    try:
        collections = db.get_collection(
            "realtime_{}".format(datetime.date.today()))
        times = collections.find({"code": "000001"}).sort(
            "datetime", QA_util_sql_mongo_sort_DESCENDING)[0]["datetime"]

        return pd.DataFrame([item for item in collections.find({"datetime": times})]).drop(["_id"], axis=1)
    except Exception as e:
        raise e

After Change


    try:
        collections = db.get_collection(
            "realtime_{}".format(date))
        return pd.DataFrame([item for item in collections.find(
            {})]).drop(["_id"], axis=1).set_index("datetime", drop=False).sort_index()
    except Exception as e:
        raise e
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 09d092ec058f3a4df8884e12b1144616d66ca264
Time: 2018-02-01
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QAQuery.py
Class Name:
Method Name: QA_fetch_quotations


Project Name: jnothman/UpSetPlot
Commit Name: f2f419b89221602dc31c69de32df1cba281db481
Time: 2019-05-30
Author: joel.nothman@gmail.com
File Name: upsetplot/tests/test_data.py
Class Name:
Method Name: test_from_contents


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: c91ee1c0b3dbeeab4b09a691d3441a7e72a136ff
Time: 2017-08-25
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QATdx.py
Class Name:
Method Name: QA_fetch_get_stock_realtime